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>com.agilejava.docbkx</groupId>
						<artifactId>docbkx-maven-plugin</artifactId> 3
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-antrun-plugin</artifactId> 4
						<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 converts the Asciidoctor documentation into single and multi page docs

4

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!