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/docs/src/main/asciidoc/ghpages.sh b/docs/src/main/asciidoc/ghpages.sh
index 3c41f8c2..09435af1 100755
--- a/docs/src/main/asciidoc/ghpages.sh
+++ b/docs/src/main/asciidoc/ghpages.sh
@@ -184,7 +184,7 @@ function copy_docs_for_current_version() {
git add -A ${ROOT_FOLDER}/${CURRENT_BRANCH}/index.html
else
cp -rf $f ${ROOT_FOLDER}/${CURRENT_BRANCH}
- git add -A ${ROOT_FOLDER}/${CURRENT_BRANCH}/$file
+ git add -A ${ROOT_FOLDER}/${CURRENT_BRANCH}/$file || echo "Failed to add the file [$file]"
fi
fi
done
diff --git a/pom.xml b/pom.xml
index 0dd207c0..d8d0e448 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
@@ -638,6 +639,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
@@ -701,10 +729,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
@@ -729,7 +757,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
@@ -738,7 +766,7 @@ limitations under the License.
-
+
@@ -755,7 +783,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_
@@ -767,7 +795,7 @@ limitations under the License.
-
+
@@ -831,7 +859,7 @@ limitations under the License.
-
+
@@ -847,10 +875,10 @@ limitations under the License.
-
+
-
+