diff --git a/2.1.x/multi/multi__reusing_the_documentation.html b/2.1.x/multi/multi__reusing_the_documentation.html index 5dd38548..1a5d256e 100644 --- a/2.1.x/multi/multi__reusing_the_documentation.html +++ b/2.1.x/multi/multi__reusing_the_documentation.html @@ -3,25 +3,25 @@ 3. Reusing the documentation

3. Reusing the documentation

Spring Cloud Build publishes its spring-cloud-build-docs module that contains helpful scripts (e.g. README generation ruby script) and css, xslt and images for the Spring Cloud documentation. If you want to follow the same convention -approach of generating documentation just add these plugins to your docs module

<profiles>
-		<profile>
-			<id>docs</id>
-			<build>
-				<plugins>
-					<plugin>
-						<groupId>org.apache.maven.plugins</groupId>
-						<artifactId>maven-dependency-plugin</artifactId> 1
-					</plugin>
-					<plugin>
-						<groupId>org.asciidoctor</groupId>
-						<artifactId>asciidoctor-maven-plugin</artifactId> 2
-					</plugin>
-					<plugin>
-						<groupId>org.apache.maven.plugins</groupId>
-						<artifactId>maven-antrun-plugin</artifactId> 3
-						<inherited>false</inherited>
-					</plugin>
-				</plugins>
-			</build>
-		</profile>
-	</profiles>

1

This plugin downloads and unpacks the resources of the spring-cloud-build-docs module

2

This plugin is required to parse the Asciidoctor documentation

3

This plugin is required to copy resources into proper final destinations and to generate main README.adoc

[Important]Important

The order of plugin declaration is important!

\ No newline at end of file +approach of generating documentation just add these plugins to your docs module

<profiles>
+		<profile>
+			<id>docs</id>
+			<build>
+				<plugins>
+					<plugin>
+						<groupId>org.apache.maven.plugins</groupId>
+						<artifactId>maven-dependency-plugin</artifactId> 1
+					</plugin>
+					<plugin>
+						<groupId>org.asciidoctor</groupId>
+						<artifactId>asciidoctor-maven-plugin</artifactId> 2
+					</plugin>
+					<plugin>
+						<groupId>org.apache.maven.plugins</groupId>
+						<artifactId>maven-antrun-plugin</artifactId> 3
+						<inherited>false</inherited>
+					</plugin>
+				</plugins>
+			</build>
+		</profile>
+	</profiles>

1

This plugin downloads and unpacks the resources of the spring-cloud-build-docs module

2

This plugin is required to parse the Asciidoctor documentation

3

This plugin is required to copy resources into proper final destinations and to generate main README.adoc

[Important]Important

The order of plugin declaration is important!

\ No newline at end of file diff --git a/2.1.x/single/spring-cloud-build.html b/2.1.x/single/spring-cloud-build.html index 1a317d22..6a6713b7 100644 --- a/2.1.x/single/spring-cloud-build.html +++ b/2.1.x/single/spring-cloud-build.html @@ -88,25 +88,25 @@ $ touch .springformat

3

Default Checkstyle rules

2

File header setup

1

Default suppression rules

4

Project defaults for Intellij that apply most of Checkstyle rules

5

Project style conventions for Intellij that apply most of Checkstyle rules

Figure 2.1. Code style

Code style

Go to FileSettingsEditorCode 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.

Figure 2.2. Inspection profiles

Code style

Go to FileSettingsEditorInspections. 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.

Checkstyle. 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

Checkstyle

Go to FileSettingsOther settingsCheckstyle. 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:

[Important]Important

Remember to set the Scan Scope to All sources since we apply checkstyle rules for production and test sources.

3. Reusing the documentation

Spring Cloud Build publishes its spring-cloud-build-docs module that contains helpful scripts (e.g. README generation ruby script) and css, xslt and images for the Spring Cloud documentation. If you want to follow the same convention -approach of generating documentation just add these plugins to your docs module

<profiles>
-		<profile>
-			<id>docs</id>
-			<build>
-				<plugins>
-					<plugin>
-						<groupId>org.apache.maven.plugins</groupId>
-						<artifactId>maven-dependency-plugin</artifactId> 1
-					</plugin>
-					<plugin>
-						<groupId>org.asciidoctor</groupId>
-						<artifactId>asciidoctor-maven-plugin</artifactId> 2
-					</plugin>
-					<plugin>
-						<groupId>org.apache.maven.plugins</groupId>
-						<artifactId>maven-antrun-plugin</artifactId> 3
-						<inherited>false</inherited>
-					</plugin>
-				</plugins>
-			</build>
-		</profile>
-	</profiles>

1

This plugin downloads and unpacks the resources of the spring-cloud-build-docs module

2

This plugin is required to parse the Asciidoctor documentation

3

This plugin is required to copy resources into proper final destinations and to generate main README.adoc

[Important]Important

The order of plugin declaration is important!

\ No newline at end of file +approach of generating documentation just add these plugins to your docs module

<profiles>
+		<profile>
+			<id>docs</id>
+			<build>
+				<plugins>
+					<plugin>
+						<groupId>org.apache.maven.plugins</groupId>
+						<artifactId>maven-dependency-plugin</artifactId> 1
+					</plugin>
+					<plugin>
+						<groupId>org.asciidoctor</groupId>
+						<artifactId>asciidoctor-maven-plugin</artifactId> 2
+					</plugin>
+					<plugin>
+						<groupId>org.apache.maven.plugins</groupId>
+						<artifactId>maven-antrun-plugin</artifactId> 3
+						<inherited>false</inherited>
+					</plugin>
+				</plugins>
+			</build>
+		</profile>
+	</profiles>

1

This plugin downloads and unpacks the resources of the spring-cloud-build-docs module

2

This plugin is required to parse the Asciidoctor documentation

3

This plugin is required to copy resources into proper final destinations and to generate main README.adoc

[Important]Important

The order of plugin declaration is important!

\ No newline at end of file