Compare commits

..
81 Commits
Author SHA1 Message Date
buildmaster 7fd3810658 Update SNAPSHOT to 4.1.3 2024-07-10 15:36:15 +00:00
buildmaster aec8559afe Bumping versions 2024-07-08 09:41:21 +00:00
Marcin Grzejszczak d700587956 Removes repo.spring.io from poms 2024-06-28 11:33:32 +02:00
Ryan Baxter 24ad0c7042 Adding extentions to antora maven plugin 2024-06-19 08:41:54 -04:00
Ryan Baxter 45684a43c0 Specifying directory for site generation 2024-06-18 17:46:43 -04:00
buildmaster be11b53913 Bumping versions 2024-06-18 20:37:24 +00:00
Ryan Baxter 334997a0f7 Configure unresolved plugin directory 2024-06-18 16:34:29 -04:00
Ryan Baxter cba02bd0af Reverting ui bundle 2024-06-18 16:26:32 -04:00
Ryan Baxter 08167be438 Update node version for new plugin 2024-06-18 16:06:29 -04:00
Ryan Baxter 1f4c1c33d0 Upgrading antora ui package and use package.json 2024-06-18 15:11:56 -04:00
buildmaster 9b92ef35a3 Bumping versions to 4.1.3-SNAPSHOT after release 2024-05-30 10:08:27 +00:00
buildmaster 106207bef2 Going back to snapshots 2024-05-30 10:08:27 +00:00
buildmaster 7ef02395ca Update SNAPSHOT to 4.1.2 2024-05-30 10:06:52 +00:00
Ryan Baxter bc9b9ea339 Create antora-playbook-template.yml 2024-04-09 10:55:37 -04:00
Ryan Baxter 6a8fb125de Update spring-cloud-deploy-docs.yml 2024-04-09 09:48:58 -04:00
Ryan Baxter 746bb19f07 Update spring-cloud-deploy-docs.yml 2024-04-09 09:47:32 -04:00
Ryan Baxter e6d9d44e78 Update spring-cloud-deploy-docs.yml 2024-04-09 09:45:09 -04:00
Ryan Baxter 565c6f4f02 Update spring-cloud-deploy-docs.yml 2024-04-09 09:38:32 -04:00
Ryan Baxter 8f5a10db73 Update spring-cloud-deploy-docs.yml 2024-04-09 09:36:46 -04:00
Ryan Baxter d31215b3c7 Update spring-cloud-deploy-docs.yml 2024-04-09 09:23:45 -04:00
Ryan Baxter 2570f39a88 Update deploy-docs-test.yml 2024-04-05 17:08:34 -04:00
Ryan Baxter e016f18d74 Create deploy-docs-test.yml 2024-04-05 17:06:43 -04:00
Ryan Baxter 8c14536ffc Create spring-cloud-deploy-docs.yml 2024-04-05 17:02:07 -04:00
Ryan Baxter f011bee813 Update antora-playbook.yml 2024-04-04 14:19:30 -04:00
buildmaster 025defee84 Bumping versions 2024-03-27 19:22:06 +00:00
Ryan Baxter 7b48b2b8e9 Merge pull request #246 from cxhello/patch-2
fix: update contributing.adoc error link
2024-03-27 09:46:12 -04:00
buildmaster 57f3dc6a1d Bumping versions to 4.1.2-SNAPSHOT after release 2024-03-27 12:33:12 +00:00
buildmaster 6f548ec691 Going back to snapshots 2024-03-27 12:33:12 +00:00
buildmaster 2ec044f1ac Update SNAPSHOT to 4.1.1 2024-03-27 12:31:50 +00:00
cxhello b756d43a94 fix: update contributing.adoc error link 2024-03-27 08:44:39 +08:00
buildmaster 4737e7405d Bumping versions 2024-03-26 20:12:50 +00:00
Ryan Baxter a884a9f6a8 Merge pull request #245 from cxhello/patch-1 2024-03-26 11:01:07 -04:00
cxhello 7144bfa34c fix: update README.adoc error link 2024-03-26 16:39:05 +08:00
Ryan Baxter 6efd154432 Update antora-playbook.yml to 0.4.11 2024-03-12 10:30:46 -04:00
buildmaster b0fef38e3e Bumping versions 2024-03-05 16:50:20 +00:00
Ryan Baxter ad732419fc Delete docs/src/main/asciidoc/contributing-docs.adoc 2023-12-19 11:03:49 -05:00
Ryan Baxter b5c7c50600 Create contributing-docs.adoc 2023-12-19 10:38:36 -05:00
buildmaster 6dac40322d Going back to snapshots 2023-12-06 14:30:48 +00:00
buildmaster 94bea8dec6 Update SNAPSHOT to 4.1.0 2023-12-06 14:29:30 +00:00
buildmaster 112414c6c8 Bumping versions to 4.1.1-SNAPSHOT after release 2023-12-06 14:07:27 +00:00
buildmaster 9dc6a2cd25 Going back to snapshots 2023-12-06 14:07:27 +00:00
buildmaster b5a2cd3f8a Update SNAPSHOT to 4.1.0 2023-12-06 14:06:05 +00:00
buildmaster e54745b14a Bumping versions 2023-11-28 20:18:55 +00:00
buildmaster 2cdd4e5995 Going back to snapshots 2023-10-31 12:49:43 +00:00
buildmaster 893884976c Update SNAPSHOT to 4.1.0-RC1 2023-10-31 12:48:29 +00:00
buildmaster 2e71bd2d16 Going back to snapshots 2023-09-27 09:43:10 +00:00
buildmaster 29656eecf3 Update SNAPSHOT to 4.1.0-M2 2023-09-27 09:41:33 +00:00
Marcin Grzejszczak bbfef2f3e2 Not running config-props using the spring-cloud-build-docs dep 2023-09-26 14:17:17 +02:00
Marcin Grzejszczak 69195e8210 Added kroki to antora packages
With this change if you want to use diagrams you can easily do that
2023-09-25 16:52:33 +02:00
Marcin Grzejszczak 0d416d9a5f Merge branch '4.0.x' 2023-09-25 14:16:06 +02:00
Marcin Grzejszczak 94e6807e09 Merge branch '3.1.x' into 4.0.x 2023-09-25 14:15:47 +02:00
Marcin Grzejszczak baca4d23cc Migrates away from spring-docs-resource to spring-asciidoctor-backend; fixes gh-242 2023-09-25 14:12:09 +02:00
buildmaster f5f29f1a07 Bumping versions 2023-09-22 20:12:53 +00:00
Spencer Gibb dffe16b622 Updates antora extention dependencies 2023-09-22 13:50:59 -04:00
Spencer Gibb 0b3cfba436 Revert "Update contributing.adoc for remote includes"
This reverts commit 656fc0c29d.
2023-09-22 13:50:58 -04:00
buildmaster b528877aab Bumping versions 2023-09-21 04:11:30 +00:00
Spencer Gibb f2de5d1302 reference 4.0.x for docs 2023-09-20 14:13:26 -04:00
buildmaster 02d99a41af Bumping versions 2023-09-15 20:12:33 +00:00
Spencer Gibb 656fc0c29d Update contributing.adoc for remote includes
This adds the component and module `cloud-build:ROOT:`
2023-09-15 15:36:24 -04:00
Spencer Gibb 9f8f92ba3a Downgrades antora node version temporarily 2023-09-11 14:45:21 -04:00
Ryan Baxter 10a19d7e3b Update building-jdk8.adoc 2023-09-08 17:03:13 -04:00
Marcin Grzejszczak 6c5dc05f3c Fixed invalid include 2023-09-08 15:38:50 +02:00
Marcin Grzejszczak 2cb70a4639 Speeds up antora build 2023-09-08 15:35:26 +02:00
Marcin Grzejszczak 19d36d1f1f More phase parameterization 2023-09-08 15:31:25 +02:00
Marcin Grzejszczak abc24359ed Added a phase for generation of readme 2023-09-08 15:11:33 +02:00
Marcin Grzejszczak dba2214255 Improved README 2023-09-08 14:49:36 +02:00
Marcin Grzejszczak 5514719931 Simplified antora setup 2023-09-08 14:48:35 +02:00
Marcin Grzejszczak 5ca4b8b018 WIP on antora build script 2023-09-08 13:32:26 +02:00
Marcin Grzejszczak 260cebd278 Fixed antora build script 2023-09-08 13:29:41 +02:00
Marcin Grzejszczak 2282c2400a Migrates documentation to Antora (#241)
* Migrate Structure

* Insert explicit ids for headers

* Copy default antora files

* Fix indentation for all pages

* Generate a default navigation

* Remove includes

* Enable Section Summary TOC for small pages

* WIP

* Updated the docs

* Removed unnecessary file deployment step

* Left deploy goal only

* Fixed configprops location

* Fixed gitignores and path of configprops generation

* Upgraded ui bundle

* Removed node files

* Removed unnecessary docs zip uploading
2023-09-08 13:00:27 +02:00
buildmaster c53e18927a Bumping versions to 4.0.6-SNAPSHOT after release 2023-07-27 19:23:47 +00:00
buildmaster 7a6735ea04 Going back to snapshots 2023-07-27 19:23:47 +00:00
buildmaster f20e58b49c Update SNAPSHOT to 4.0.5 2023-07-27 19:22:04 +00:00
Olga MaciaszekSharma 1b60c5b801 Upgrade to Boot 3.0.9. 2023-07-26 16:46:13 +02:00
buildmaster 53f01d9804 Bumping versions 2023-07-07 04:11:30 +00:00
buildmaster 413ada770c Bumping versions to 4.0.5-SNAPSHOT after release 2023-07-06 06:36:03 +00:00
buildmaster 00d08e83b0 Going back to snapshots 2023-07-06 06:36:03 +00:00
buildmaster c3995a08fa Update SNAPSHOT to 4.0.4 2023-07-06 06:34:30 +00:00
buildmaster a237137ed4 Bumping versions to 3.1.9-SNAPSHOT after release 2023-06-29 10:28:09 +00:00
buildmaster 195ce4e753 Going back to snapshots 2023-06-29 10:28:09 +00:00
buildmaster 6a8dfa60d3 Update SNAPSHOT to 3.1.8 2023-06-29 10:26:50 +00:00
17 changed files with 216 additions and 188 deletions
+15
View File
@@ -0,0 +1,15 @@
name: Deploy Docs Test
on:
push:
branches-ignore: [ gh-pages ]
tags: '**'
repository_dispatch:
types: request-build-reference # legacy
#schedule:
#- cron: '0 10 * * *' # Once per day at 10am UTC
workflow_dispatch:
jobs:
deploy-docs:
uses: spring-cloud/spring-cloud-build/.github/workflows/spring-cloud-deploy-docs.yml@main
secrets: inherit
@@ -0,0 +1,29 @@
name: Spring Cloud Deploy Docs
on:
workflow_call:
permissions:
actions: write
jobs:
build:
runs-on: ubuntu-latest
# FIXME: enable when pushed to spring-projects
# if: github.repository_owner == 'spring-projects'
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: docs-build
fetch-depth: 1
# TODO: Do we need these two below jobs? They don't appear to do much when they run
- name: Dispatch (partial build)
if: github.ref_type == 'branch'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh workflow run deploy-docs.yml -r $(git rev-parse --abbrev-ref HEAD) -f build-refname=${{ github.ref_name }}
- name: Dispatch (full build)
if: github.ref_type == 'tag'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh workflow run deploy-docs.yml -r $(git rev-parse --abbrev-ref HEAD)
+2 -2
View File
@@ -25,5 +25,5 @@ _configprops.adoc
_spans.adoc
_metrics.adoc
_conventions.adoc
package.json
package-lock.json
/package.json
package-lock.json
-8
View File
@@ -52,14 +52,6 @@
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>spring-releases</id>
<name>Spring Releases</name>
<url>https://repo.spring.io/release</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
+70 -54
View File
@@ -26,18 +26,6 @@ and to deploy snapshots to repo.spring.io:
$ mvn deploy -DaltSnapshotDeploymentRepository=repo.spring.io::default::https://repo.spring.io/snapshot
----
for a RELEASE build use
----
$ mvn deploy -DaltReleaseDeploymentRepository=repo.spring.io::default::https://repo.spring.io/release
----
and for jcenter use
----
$ mvn deploy -DaltReleaseDeploymentRepository=bintray::default::https://api.bintray.com/maven/spring/jars/org.springframework.cloud:build
----
and for Maven Central use
----
@@ -49,15 +37,17 @@ $ mvn deploy -P central -DaltReleaseDeploymentRepository=sonatype-nexus-staging:
[[contributing]]
= Contributing
:spring-cloud-build-branch: master
:spring-cloud-build-branch: main
Spring Cloud is released under the non-restrictive Apache 2.0 license,
and follows a very standard Github development process, using Github
tracker for issues and merging pull requests into master. If you want
tracker for issues and merging pull requests into main. If you want
to contribute even something trivial please do not hesitate, but
follow the guidelines below.
=== Sign the Contributor License Agreement
[[sign-the-contributor-license-agreement]]
== Sign the Contributor License Agreement
Before we accept a non-trivial patch or pull request we will need you to sign the
https://cla.pivotal.io/sign/spring[Contributor License Agreement].
Signing the contributor's agreement does not grant anyone commit rights to the main
@@ -65,19 +55,21 @@ repository, but it does mean that we can accept your contributions, and you will
author credit if we do. Active contributors might be asked to join the core team, and
given the ability to merge pull requests.
=== Code of Conduct
This project adheres to the Contributor Covenant https://github.com/spring-cloud/spring-cloud-build/blob/master/docs/src/main/asciidoc/code-of-conduct.adoc[code of
[[code-of-conduct]]
== Code of Conduct
This project adheres to the Contributor Covenant https://github.com/spring-cloud/spring-cloud-build/blob/main/docs/src/main/asciidoc/code-of-conduct.adoc[code of
conduct]. By participating, you are expected to uphold this code. Please report
unacceptable behavior to spring-code-of-conduct@pivotal.io.
=== Code Conventions and Housekeeping
[[code-conventions-and-housekeeping]]
== Code Conventions and Housekeeping
None of these is essential for a pull request, but they will all help. They can also be
added after the original pull request but before a merge.
* Use the Spring Framework code format conventions. If you use Eclipse
you can import formatter settings using the
`eclipse-code-formatter.xml` file from the
https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/master/spring-cloud-dependencies-parent/eclipse-code-formatter.xml[Spring
https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/main/spring-cloud-dependencies-parent/eclipse-code-formatter.xml[Spring
Cloud Build] project. If using IntelliJ, you can use the
https://plugins.jetbrains.com/plugin/6546[Eclipse Code Formatter
Plugin] to import the same file.
@@ -90,13 +82,14 @@ added after the original pull request but before a merge.
than cosmetic changes).
* Add some Javadocs and, if you change the namespace, some XSD doc elements.
* A few unit tests would help a lot as well -- someone has to do it.
* If no-one else is using your branch, please rebase it against the current master (or
* If no-one else is using your branch, please rebase it against the current main (or
other target branch in the main project).
* When writing a commit message please follow https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html[these conventions],
if you are fixing an existing issue please add `Fixes gh-XXXX` at the end of the commit
message (where XXXX is the issue number).
=== Checkstyle
[[checkstyle]]
== Checkstyle
Spring Cloud Build comes with a set of checkstyle rules. You can find them in the `spring-cloud-build-tools` module. The most notable files under the module are:
@@ -114,7 +107,8 @@ Spring Cloud Build comes with a set of checkstyle rules. You can find them in th
<2> File header setup
<3> Default suppression rules
==== Checkstyle configuration
[[checkstyle-configuration]]
=== Checkstyle configuration
Checkstyle rules are *disabled by default*. To add checkstyle to your project just define the following properties and plugins.
@@ -173,16 +167,18 @@ If you need to suppress some rules (e.g. line length needs to be longer), then i
It's advisable to copy the `${spring-cloud-build.rootFolder}/.editorconfig` and `${spring-cloud-build.rootFolder}/.springformat` to your project. That way, some default formatting rules will be applied. You can do so by running this script:
```bash
$ curl https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/master/.editorconfig -o .editorconfig
$ curl https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/main/.editorconfig -o .editorconfig
$ touch .springformat
```
=== IDE setup
[[ide-setup]]
== IDE setup
==== Intellij IDEA
[[intellij-idea]]
=== Intellij IDEA
In order to setup Intellij you should import our coding conventions, inspection profiles and set up the checkstyle plugin.
The following files can be found in the https://github.com/spring-cloud/spring-cloud-build/tree/master/spring-cloud-build-tools[Spring Cloud Build] project.
The following files can be found in the https://github.com/spring-cloud/spring-cloud-build/tree/main/spring-cloud-build-tools[Spring Cloud Build] project.
.spring-cloud-build-tools/
----
@@ -205,13 +201,13 @@ The following files can be found in the https://github.com/spring-cloud/spring-c
.Code style
image::https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/{spring-cloud-build-branch}/docs/src/main/asciidoc/images/intellij-code-style.png[Code style]
image::https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/main/docs/modules/ROOT/assets/images/intellij-code-style.png[Code style]
Go to `File` -> `Settings` -> `Editor` -> `Code style`. There click on the icon next to the `Scheme` section. There, click on the `Import Scheme` value and pick the `Intellij IDEA code style XML` option. Import the `spring-cloud-build-tools/src/main/resources/intellij/Intellij_Spring_Boot_Java_Conventions.xml` file.
.Inspection profiles
image::https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/{spring-cloud-build-branch}/docs/src/main/asciidoc/images/intellij-inspections.png[Code style]
image::https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/main/docs/modules/ROOT/assets/images/intellij-inspections.png[Code style]
Go to `File` -> `Settings` -> `Editor` -> `Inspections`. There click on the icon next to the `Profile` section. There, click on the `Import Profile` and import the `spring-cloud-build-tools/src/main/resources/intellij/Intellij_Project_Defaults.xml` file.
@@ -219,21 +215,23 @@ Go to `File` -> `Settings` -> `Editor` -> `Inspections`. There click on the icon
To have Intellij work with Checkstyle, you have to install the `Checkstyle` plugin. It's advisable to also install the `Assertions2Assertj` to automatically convert the JUnit assertions
image::https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/{spring-cloud-build-branch}/docs/src/main/asciidoc/images/intellij-checkstyle.png[Checkstyle]
image::https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/main/docs/modules/ROOT/assets/images/intellij-checkstyle.png[Checkstyle]
Go to `File` -> `Settings` -> `Other settings` -> `Checkstyle`. There click on the `+` icon in the `Configuration file` section. There, you'll have to define where the checkstyle rules should be picked from. In the image above, we've picked the rules from the cloned Spring Cloud Build repository. However, you can point to the Spring Cloud Build's GitHub repository (e.g. for the `checkstyle.xml` : `https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/master/spring-cloud-build-tools/src/main/resources/checkstyle.xml`). We need to provide the following variables:
Go to `File` -> `Settings` -> `Other settings` -> `Checkstyle`. There click on the `+` icon in the `Configuration file` section. There, you'll have to define where the checkstyle rules should be picked from. In the image above, we've picked the rules from the cloned Spring Cloud Build repository. However, you can point to the Spring Cloud Build's GitHub repository (e.g. for the `checkstyle.xml` : `https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/main/spring-cloud-build-tools/src/main/resources/checkstyle.xml`). We need to provide the following variables:
- `checkstyle.header.file` - please point it to the Spring Cloud Build's, `spring-cloud-build-tools/src/main/resources/checkstyle-header.txt` file either in your cloned repo or via the `https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/master/spring-cloud-build-tools/src/main/resources/checkstyle-header.txt` URL.
- `checkstyle.suppressions.file` - default suppressions. Please point it to the Spring Cloud Build's, `spring-cloud-build-tools/src/checkstyle/checkstyle-suppressions.xml` file either in your cloned repo or via the `https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/master/spring-cloud-build-tools/src/checkstyle/checkstyle-suppressions.xml` URL.
- `checkstyle.header.file` - please point it to the Spring Cloud Build's, `spring-cloud-build-tools/src/main/resources/checkstyle-header.txt` file either in your cloned repo or via the `https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/main/spring-cloud-build-tools/src/main/resources/checkstyle-header.txt` URL.
- `checkstyle.suppressions.file` - default suppressions. Please point it to the Spring Cloud Build's, `spring-cloud-build-tools/src/checkstyle/checkstyle-suppressions.xml` file either in your cloned repo or via the `https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/main/spring-cloud-build-tools/src/checkstyle/checkstyle-suppressions.xml` URL.
- `checkstyle.additional.suppressions.file` - this variable corresponds to suppressions in your local project. E.g. you're working on `spring-cloud-contract`. Then point to the `project-root/src/checkstyle/checkstyle-suppressions.xml` folder. Example for `spring-cloud-contract` would be: `/home/username/spring-cloud-contract/src/checkstyle/checkstyle-suppressions.xml`.
IMPORTANT: Remember to set the `Scan Scope` to `All sources` since we apply checkstyle rules for production and test sources.
=== Duplicate Finder
[[duplicate-finder]]
== Duplicate Finder
Spring Cloud Build brings along the `basepom:duplicate-finder-maven-plugin`, that enables flagging duplicate and conflicting classes and resources on the java classpath.
==== Duplicate Finder configuration
[[duplicate-finder-configuration]]
=== Duplicate Finder configuration
Duplicate finder is *enabled by default* and will run in the `verify` phase of your Maven build, but it will only take effect in your project if you add the `duplicate-finder-maven-plugin` to the `build` section of the projecst's `pom.xml`.
@@ -313,49 +311,48 @@ approach of generating documentation just add these plugins to your `docs` modul
<profile>
<id>docs</id>
<build>
<resources>
<resource>
<directory>src/main/antora/resources/antora-resources</directory>
<filtering>true</filtering>
</resource>
</resources>
<plugins>
<plugin>
<groupId>pl.project13.maven</groupId>
<artifactId>git-commit-id-plugin</artifactId> <1>
<artifactId>git-commit-id-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId> <2>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId> <3>
<artifactId>maven-dependency-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId> <4>
<artifactId>exec-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.asciidoctor</groupId>
<artifactId>asciidoctor-maven-plugin</artifactId> <5>
<groupId>io.spring.maven.antora</groupId>
<artifactId>antora-component-version-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.antora</groupId>
<artifactId>antora-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId> <6>
<artifactId>maven-antrun-plugin</artifactId>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId> <7>
<artifactId>maven-deploy-plugin</artifactId>
</plugin>
</plugins>
</build>
</profile>
</profiles>
----
<1> This plugin downloads sets up all the git information of the project
<2> This plugin downloads the resources of the `spring-cloud-build-docs` module
<3> This plugin unpacks the resources of the `spring-cloud-build-docs` module
<4> This plugin generates an `adoc` file with all the configuration properties from the classpath
<5> This plugin is required to parse the Asciidoctor documentation
<6> This plugin is required to copy resources into proper final destinations and to generate main README.adoc and to assert that no files use unresolved links
IMPORTANT: The order of plugin declaration is important!
In order for the build to generate the `adoc` file with all your configuration properties, your `docs` module should contain all the dependencies on the classpath, that you would want to scan for configuration properties. The file will be output to `${docsModule}/src/main/asciidoc/_configprops.adoc` file (configurable via the `configprops.path` property).
In order for the build to generate the `adoc` file with all your configuration properties, your `docs` module should contain all the dependencies on the classpath, that you would want to scan for configuration properties.
If you want to modify which of the configuration properties are put in the table, you can tweak the `configprops.inclusionPattern` pattern to include only a subset of the properties (e.g. `<configprops.inclusionPattern>spring.sleuth.*</configprops.inclusionPattern>`).
@@ -363,7 +360,26 @@ Spring Cloud Build Docs comes with a set of attributes for asciidoctor that you
[source,yml]
----
Unresolved directive in <stdin> - include::https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/main/docs/src/main/antora/resources/antora-resources/antora.yml[indent=0]
version: @antora-component.version@
prerelease: @antora-component.prerelease@
asciidoc:
attributes:
attribute-missing: 'warn'
chomp: 'all'
project-root: @maven.multiModuleProjectDirectory@
github-repo: @docs.main@
github-raw: https://raw.githubusercontent.com/spring-cloud/@docs.main@/@github-tag@
github-code: https://github.com/spring-cloud/@docs.main@/tree/@github-tag@
github-issues: https://github.com/spring-cloud/@docs.main@/issues/
github-wiki: https://github.com/spring-cloud/@docs.main@/wiki
spring-cloud-version: @project.version@
github-tag: @github-tag@
version-type: @version-type@
docs-url: https://docs.spring.io/@docs.main@/docs/@project.version@
raw-docs-url: https://raw.githubusercontent.com/spring-cloud/@docs.main@/@github-tag@
project-version: @project.version@
project-name: @docs.main@
----
[[updating-the-guides]]
+40
View File
@@ -0,0 +1,40 @@
antora:
extensions:
- '@springio/antora-extensions/partial-build-extension'
# atlas-extension must be before latest-version-extension so latest versions are applied to imported versions
- '@antora/atlas-extension'
- require: '@springio/antora-extensions/latest-version-extension'
- require: '@springio/antora-extensions/inject-collector-cache-config-extension'
- '@antora/collector-extension'
- require: '@springio/antora-extensions/root-component-extension'
root_component_name: 'cloud-build'
- '@springio/antora-extensions/static-page-extension'
site:
title: {{ .site_title }}
url: {{ .site_ url }}
content:
sources:
- url: ./..
branches: HEAD
start_path: docs
worktrees: true
asciidoc:
attributes:
page-stackoverflow-url: https://stackoverflow.com/tags/spring-cloud
page-pagination: ''
hide-uri-scheme: '@'
tabs-sync-option: '@'
chomp: 'all'
extensions:
- '@asciidoctor/tabs'
- '@springio/asciidoctor-extensions'
sourcemap: true
urls:
latest_version_segment: ''
runtime:
log:
failure_level: warn
format: pretty
ui:
bundle:
url: https://github.com/spring-io/antora-ui-spring/releases/download/v0.4.11/ui-bundle.zip
+2 -7
View File
@@ -1,11 +1,6 @@
antora:
extensions:
- '@springio/antora-extensions/partial-build-extension'
- require: '@springio/antora-extensions/latest-version-extension'
- require: '@springio/antora-extensions/inject-collector-cache-config-extension'
- '@antora/collector-extension'
- '@antora/atlas-extension'
- require: '@springio/antora-extensions/root-component-extension'
- require: '@springio/antora-extensions'
root_component_name: 'cloud-build'
site:
title: Spring Cloud Build
@@ -35,4 +30,4 @@ runtime:
format: pretty
ui:
bundle:
url: https://github.com/spring-io/antora-ui-spring/releases/download/v0.3.5/ui-bundle.zip
url: https://github.com/spring-io/antora-ui-spring/releases/download/v0.4.15/ui-bundle.zip
+1 -1
View File
@@ -6,7 +6,7 @@ nav:
ext:
collector:
run:
command: ./mvnw validate process-resources -Pdocs -pl docs
command: ./mvnw --no-transfer-progress -B process-resources -Pdocs -pl docs -Dantora-maven-plugin.phase=none -Dgenerate-docs.phase=none -Dgenerate-readme.phase=none -Dgenerate-cloud-resources.phase=none -Dmaven-dependency-plugin-for-docs.phase=none -Dmaven-dependency-plugin-for-docs-classes.phase=none -DskipTests
local: true
scan:
dir: ./target/classes/antora-resources/
+3 -3
View File
@@ -162,13 +162,13 @@ The following files can be found in the https://github.com/spring-cloud/spring-c
.Code style
image::intellij-code-style.png[Code style]
image::https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/main/docs/modules/ROOT/assets/images/intellij-code-style.png[Code style]
Go to `File` -> `Settings` -> `Editor` -> `Code style`. There click on the icon next to the `Scheme` section. There, click on the `Import Scheme` value and pick the `Intellij IDEA code style XML` option. Import the `spring-cloud-build-tools/src/main/resources/intellij/Intellij_Spring_Boot_Java_Conventions.xml` file.
.Inspection profiles
image::intellij-inspections.png[Code style]
image::https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/main/docs/modules/ROOT/assets/images/intellij-inspections.png[Code style]
Go to `File` -> `Settings` -> `Editor` -> `Inspections`. There click on the icon next to the `Profile` section. There, click on the `Import Profile` and import the `spring-cloud-build-tools/src/main/resources/intellij/Intellij_Project_Defaults.xml` file.
@@ -176,7 +176,7 @@ Go to `File` -> `Settings` -> `Editor` -> `Inspections`. There click on the icon
To have Intellij work with Checkstyle, you have to install the `Checkstyle` plugin. It's advisable to also install the `Assertions2Assertj` to automatically convert the JUnit assertions
image::intellij-checkstyle.png[Checkstyle]
image::https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/main/docs/modules/ROOT/assets/images/intellij-checkstyle.png[Checkstyle]
Go to `File` -> `Settings` -> `Other settings` -> `Checkstyle`. There click on the `+` icon in the `Configuration file` section. There, you'll have to define where the checkstyle rules should be picked from. In the image above, we've picked the rules from the cloned Spring Cloud Build repository. However, you can point to the Spring Cloud Build's GitHub repository (e.g. for the `checkstyle.xml` : `https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/main/spring-cloud-build-tools/src/main/resources/checkstyle.xml`). We need to provide the following variables:
+10
View File
@@ -0,0 +1,10 @@
{
"dependencies": {
"antora": "3.2.0-alpha.4",
"@antora/atlas-extension": "1.0.0-alpha.2",
"@antora/collector-extension": "1.0.0-alpha.3",
"@asciidoctor/tabs": "1.0.0-beta.6",
"@springio/antora-extensions": "1.11.1",
"@springio/asciidoctor-extensions": "1.0.0-alpha.10"
}
}
+5 -10
View File
@@ -10,7 +10,7 @@
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-build</artifactId>
<version>4.1.0-SNAPSHOT</version>
<version>4.1.3</version>
</parent>
<properties>
<docs.main>spring-cloud-build</docs.main>
@@ -18,6 +18,7 @@
<!-- We don't want to downloaded sources of our own project-->
<maven-dependency-plugin-for-docs.phase>none</maven-dependency-plugin-for-docs.phase>
<maven-dependency-plugin-for-docs-classes.phase>none</maven-dependency-plugin-for-docs-classes.phase>
<generate-cloud-resources.phase>none</generate-cloud-resources.phase>
<docs.resources.dir>${project.basedir}/src/main/</docs.resources.dir>
<!-- Don't upload docs jar to central / repo.spring.io -->
<!-- TODO: temporary, don't want it to central? -->
@@ -84,6 +85,7 @@
</plugin>
</plugins>
</build>
<!-- tag::docs[] -->
<profiles>
<profile>
<id>docs</id>
@@ -112,16 +114,8 @@
<artifactId>antora-component-version-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>io.spring.maven.antora</groupId>
<groupId>org.antora</groupId>
<artifactId>antora-maven-plugin</artifactId>
<executions>
<execution>
<phase>prepare-package</phase>
<goals>
<goal>antora</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
@@ -133,5 +127,6 @@
</plugins>
</build>
</profile>
<!-- end::docs[] -->
</profiles>
</project>
+3 -57
View File
@@ -19,18 +19,6 @@ and to deploy snapshots to repo.spring.io:
$ mvn deploy -DaltSnapshotDeploymentRepository=repo.spring.io::default::https://repo.spring.io/snapshot
----
for a RELEASE build use
----
$ mvn deploy -DaltReleaseDeploymentRepository=repo.spring.io::default::https://repo.spring.io/release
----
and for jcenter use
----
$ mvn deploy -DaltReleaseDeploymentRepository=bintray::default::https://api.bintray.com/maven/spring/jars/org.springframework.cloud:build
----
and for Maven Central use
----
@@ -42,7 +30,7 @@ $ mvn deploy -P central -DaltReleaseDeploymentRepository=sonatype-nexus-staging:
[[contributing]]
= Contributing
include::https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/main/docs/src/main/asciidoc/contributing.adoc[]
include::https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/main/docs/modules/ROOT/partials/contributing.adoc[]
[[flattening-the-poms]]
= Flattening the POMs
@@ -73,54 +61,12 @@ approach of generating documentation just add these plugins to your `docs` modul
[source,xml]
----
<profiles>
<profile>
<id>docs</id>
<build>
<plugins>
<plugin>
<groupId>pl.project13.maven</groupId>
<artifactId>git-commit-id-plugin</artifactId> <1>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId> <2>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId> <3>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId> <4>
</plugin>
<plugin>
<groupId>org.asciidoctor</groupId>
<artifactId>asciidoctor-maven-plugin</artifactId> <5>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId> <6>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId> <7>
</plugin>
</plugins>
</build>
</profile>
</profiles>
include::https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/main/docs/pom.xml[indent=0,tags=docs]
----
<1> This plugin downloads sets up all the git information of the project
<2> This plugin downloads the resources of the `spring-cloud-build-docs` module
<3> This plugin unpacks the resources of the `spring-cloud-build-docs` module
<4> This plugin generates an `adoc` file with all the configuration properties from the classpath
<5> This plugin is required to parse the Asciidoctor documentation
<6> This plugin is required to copy resources into proper final destinations and to generate main README.adoc and to assert that no files use unresolved links
<7> This plugin ensures that the generated zip docs will get published
IMPORTANT: The order of plugin declaration is important!
In order for the build to generate the `adoc` file with all your configuration properties, your `docs` module should contain all the dependencies on the classpath, that you would want to scan for configuration properties. The file will be output to `${docsModule}/src/main/asciidoc/_configprops.adoc` file (configurable via the `configprops.path` property).
In order for the build to generate the `adoc` file with all your configuration properties, your `docs` module should contain all the dependencies on the classpath, that you would want to scan for configuration properties.
If you want to modify which of the configuration properties are put in the table, you can tweak the `configprops.inclusionPattern` pattern to include only a subset of the properties (e.g. `<configprops.inclusionPattern>spring.sleuth.*</configprops.inclusionPattern>`).
+2 -2
View File
@@ -40,7 +40,7 @@ $ mvn deploy -P central -DaltReleaseDeploymentRepository=sonatype-nexus-staging:
== Contributing
include::https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/main/docs/src/main/asciidoc/contributing.adoc[]
include::https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/main/docs/modules/ROOT/partials/contributing.adoc[]
== Flattening the POMs
@@ -124,7 +124,7 @@ Spring Cloud Build Docs comes with a set of attributes for asciidoctor that you
[source,xml]
----
include::https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/main/pom.xml[tags=attributes,indent=0]
include::https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/main/docs/pom.xml[tags=docs,indent=0]
----
== Updating the guides
+29 -7
View File
@@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-build</artifactId>
<version>4.1.0-SNAPSHOT</version>
<version>4.1.3</version>
<packaging>pom</packaging>
<name>Spring Cloud Parent</name>
<description>Spring Cloud parent pom, managing plugins and dependencies for Spring
@@ -28,8 +28,8 @@
<maven.compiler.target>${java.version}</maven.compiler.target>
<main.basedir>${basedir}</main.basedir>
<docs.main>${project.artifactId}</docs.main>
<spring-boot.version>3.2.0-SNAPSHOT</spring-boot.version>
<spring-cloud-build.version>4.1.0-SNAPSHOT</spring-cloud-build.version>
<spring-boot.version>3.2.7</spring-boot.version>
<spring-cloud-build.version>4.1.3</spring-cloud-build.version>
<docs.resources.dir>${project.build.directory}/build-docs</docs.resources.dir>
<docs.classes.dir>${project.build.directory}/build-docs-classes</docs.classes.dir>
<refdocs.build.directory>${project.build.directory}/refdocs/</refdocs.build.directory>
@@ -139,6 +139,11 @@
<copy-missing-html-files.phase>package</copy-missing-html-files.phase>
<package-and-attach-docs-zip.phase>package</package-and-attach-docs-zip.phase>
<antora-maven-plugin.version>0.0.4</antora-maven-plugin.version>
<org-antora-maven-plugin.version>1.0.0-alpha.4</org-antora-maven-plugin.version>
<node.version>v16.20.2</node.version>
<antora-maven-plugin.phase>prepare-package</antora-maven-plugin.phase>
<generate-readme.phase>prepare-package</generate-readme.phase>
<generate-cloud-resources.phase>generate-resources</generate-cloud-resources.phase>
</properties>
<dependencyManagement>
<dependencies>
@@ -1063,10 +1068,27 @@
</executions>
</plugin>
<plugin>
<groupId>io.spring.maven.antora</groupId>
<groupId>org.antora</groupId>
<artifactId>antora-maven-plugin</artifactId>
<version>${antora-maven-plugin.version}</version>
<version>${org-antora-maven-plugin.version}</version>
<extensions>true</extensions>
<configuration>
<!-- TODO: remove when CI upgrades past ubuntu 1804 -->
<nodeVersion>${node.version}</nodeVersion>
<options>
<option>--to-dir=target/antora/site</option>
<option>--stacktrace</option>
<option>--fetch</option>
</options>
</configuration>
<executions>
<execution>
<phase>${antora-maven-plugin.phase}</phase>
<goals>
<goal>antora</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
@@ -1075,7 +1097,7 @@
<executions>
<execution>
<id>generate-configprops</id>
<phase>generate-resources</phase>
<phase>${generate-cloud-resources.phase}</phase>
<goals>
<goal>java</goal>
</goals>
@@ -1144,7 +1166,7 @@
<executions>
<execution>
<id>readme</id>
<phase>prepare-package</phase>
<phase>${generate-readme.phase}</phase>
<goals>
<goal>run</goal>
</goals>
+3 -19
View File
@@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-build-dependencies</artifactId>
<version>4.1.0-SNAPSHOT</version>
<version>4.1.3</version>
<name>spring-cloud-build-dependencies</name>
<packaging>pom</packaging>
<description>Spring Cloud Build Dependencies: an internal BOM for use with Spring
@@ -14,12 +14,12 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>3.2.0-SNAPSHOT</version>
<version>3.2.7</version>
<relativePath/>
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<spring-boot.version>3.2.0-SNAPSHOT</spring-boot.version>
<spring-boot.version>3.2.7</spring-boot.version>
<maven-gpg-plugin.version>3.0.1</maven-gpg-plugin.version>
</properties>
<build>
@@ -141,14 +141,6 @@
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>spring-releases</id>
<name>Spring Releases</name>
<url>https://repo.spring.io/release</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
@@ -167,14 +159,6 @@
<enabled>false</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>spring-releases</id>
<name>Spring Releases</name>
<url>https://repo.spring.io/release</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
+1 -1
View File
@@ -10,7 +10,7 @@
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-build</artifactId>
<version>4.1.0-SNAPSHOT</version>
<version>4.1.3</version>
</parent>
<dependencies>
<dependency>
+1 -17
View File
@@ -4,7 +4,7 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.springframework.cloud</groupId>
<version>4.1.0-SNAPSHOT</version>
<version>4.1.3</version>
<artifactId>spring-cloud-dependencies-parent</artifactId>
<packaging>pom</packaging>
<name>spring-cloud-dependencies-parent</name>
@@ -187,14 +187,6 @@
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>spring-releases</id>
<name>Spring Releases</name>
<url>https://repo.spring.io/release</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
@@ -213,14 +205,6 @@
<enabled>false</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>spring-releases</id>
<name>Spring Releases</name>
<url>https://repo.spring.io/release</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>