diff --git a/docs/pom.xml b/docs/pom.xml new file mode 100644 index 00000000..f06d7b57 --- /dev/null +++ b/docs/pom.xml @@ -0,0 +1,27 @@ + + + 4.0.0 + spring-cloud-build-docs + spring-cloud-build-docs + jar + Spring Cloud Build Docs + + org.springframework.cloud + spring-cloud-build + 1.3.5.BUILD-SNAPSHOT + + + + + src/main + + + + + maven-deploy-plugin + 2.8.2 + + + + diff --git a/docs/src/main/asciidoc/README.adoc b/docs/src/main/asciidoc/README.adoc index 5b78335c..b2e0ac47 100644 --- a/docs/src/main/asciidoc/README.adoc +++ b/docs/src/main/asciidoc/README.adoc @@ -41,3 +41,44 @@ $ mvn deploy -P central -DaltReleaseDeploymentRepository=sonatype-nexus-staging: == Contributing include::https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/master/docs/src/main/asciidoc/contributing.adoc[] + +== 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 + +[source,xml] +---- + + + docs + + + + org.apache.maven.plugins + maven-dependency-plugin <1> + + + org.asciidoctor + asciidoctor-maven-plugin <2> + + + com.agilejava.docbkx + docbkx-maven-plugin <3> + + + org.apache.maven.plugins + maven-antrun-plugin <4> + false + + + + + +---- +<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 diff --git a/pom.xml b/pom.xml index 9f0d3986..36b711ea 100644 --- a/pom.xml +++ b/pom.xml @@ -9,6 +9,7 @@ Spring Cloud Parent Spring Cloud parent pom, managing plugins and dependencies for Spring Cloud projects + docs spring-cloud-build-dependencies spring-cloud-dependencies-parent spring-cloud-build-tools @@ -631,6 +632,33 @@ limitations under the License. + + org.apache.maven.plugins + maven-dependency-plugin + 3.0.0 + + + unpack-docs + generate-resources + + unpack + + + + + org.springframework.cloud + spring-cloud-build-docs + ${spring-cloud-build.version} + sources + jar + false + ${project.build.directory}/build-docs + + + + + + org.asciidoctor asciidoctor-maven-plugin @@ -694,10 +722,10 @@ limitations under the License. ${docs.main}.xml true false - ${basedir}/src/main/docbook/xsl/pdf.xsl + ${project.build.directory}/build-docs/docbook/xsl/pdf.xsl 1 1 - ${basedir}/src/main/docbook/xsl/xslthl-config.xml + ${project.build.directory}/build-docs/docbook/xsl/xslthl-config.xml @@ -722,7 +750,7 @@ limitations under the License. prepare-package - ${basedir}/src/main/docbook/xsl/html-singlepage.xsl + ${project.build.directory}/build-docs/docbook/xsl/html-singlepage.xsl ${basedir}/target/docbook/htmlsingle @@ -731,7 +759,7 @@ limitations under the License. - + @@ -748,7 +776,7 @@ limitations under the License. prepare-package - ${basedir}/src/main/docbook/xsl/html-multipage.xsl + ${project.build.directory}/build-docs/docbook/xsl/html-multipage.xsl ${basedir}/target/docbook/html multi_ @@ -760,7 +788,7 @@ limitations under the License. - + @@ -824,7 +852,7 @@ limitations under the License. - + @@ -840,10 +868,10 @@ limitations under the License. - + - +