From ed3347f00da189346097faf4f948dca4b8c3f634 Mon Sep 17 00:00:00 2001 From: Brian Clozel Date: Fri, 23 Nov 2018 21:27:31 +0100 Subject: [PATCH] Configure Asciidoctor toolchain for ref docs This commit replaces the Docbook+Asciidoctor documentation toolchain by a single Asciidoctor generation process. First, we need to unzip the contents of the Spring Asciidoctor documentation resources provided by the `io.spring.docsresources:spring-docs-resources` distribution zip. This is done in a `/target/refdocs` folder. We then copy all files from `src/main/asciidoc` to the same location, and then launch the generation process. Closes gh-12611 --- spring-boot-project/spring-boot-docs/pom.xml | 216 ++++++------------ .../main/asciidoc/documentation-overview.adoc | 8 +- .../spring-boot-parent/pom.xml | 7 +- 3 files changed, 78 insertions(+), 153 deletions(-) diff --git a/spring-boot-project/spring-boot-docs/pom.xml b/spring-boot-project/spring-boot-docs/pom.xml index e961ed2cfc..69e9d74912 100644 --- a/spring-boot-project/spring-boot-docs/pom.xml +++ b/spring-boot-project/spring-boot-docs/pom.xml @@ -13,6 +13,7 @@ Spring Boot Docs ${basedir}/../.. + ${project.build.directory}/refdocs/ @@ -943,6 +944,14 @@ spring-boot-starter-web test + + + io.spring.docresources + spring-doc-resources + 0.1.0-BUILD-SNAPSHOT + zip + true + @@ -1150,6 +1159,42 @@ + + unpack-doc-resources + + unpack-dependencies + + generate-resources + + io.spring.docresources + spring-doc-resources + zip + true + ${refdocs.build.directory} + + + + + + org.apache.maven.plugins + maven-resources-plugin + + + copy-asciidoc-resources + generate-resources + + copy-resources + + + ${refdocs.build.directory} + + + src/main/asciidoc + false + + + + @@ -1221,165 +1266,45 @@ org.asciidoctor asciidoctor-maven-plugin + + ${refdocs.build.directory} + ${project.build.directory}/generated-docs/reference/html + + ${revision} + ${spring-boot-repo} + ${spring-security.version} + ${spring-ws.version} + ${github-tag} + ${spring.version} + ${spring.version} + ${revision} + ${project.basedir}/src/ + + - generate-docbook + generate-html-documentation prepare-package process-asciidoc - index.adoc - docbook5 + html5 + highlight.js book - true - ${jooq.version} - ${spring-framework.version} - ${revision} - ${revision} - ${spring-boot-repo} - ${spring-framework.version} - ${spring-security.version} - ${spring-ws.version} - ${github-tag} + js/highlight + atom-one-dark-reasonable + true + ./images + font + css/ + spring.css - - com.agilejava.docbkx - docbkx-maven-plugin - 2.0.17 - - ${basedir}/target/generated-docs - index.xml - true - false - ${basedir}/src/main/docbook/xsl/pdf.xsl - 1 - 1 - ${basedir}/src/main/docbook/xsl/xslthl-config.xml - - - - net.sf.xslthl - xslthl - 2.1.0 - - - net.sf.docbook - docbook-xml - 5.0-all - resources - zip - runtime - - - - - html-single - - generate-html - - prepare-package - - ${basedir}/src/main/docbook/xsl/html-singlepage.xsl - ${basedir}/target/docbook/htmlsingle - - - - - - - - - - - - - - - - - - - html - - generate-html - - prepare-package - - ${basedir}/src/main/docbook/xsl/html-multipage.xsl - ${basedir}/target/docbook/html - true - - - - - - - - - - - - - - - - - - - pdf - - generate-pdf - - prepare-package - - ${basedir}/src/main/docbook/xsl/pdf.xsl - ${basedir}/target/docbook/pdf - - - - - - - - - - - - epub - - generate-epub3 - - prepare-package - - ${basedir}/src/main/docbook/xsl/epub.xsl - ${basedir}/target/docbook/epub - - - - - - - - - - - - - - - - - - - org.apache.maven.plugins maven-antrun-plugin @@ -1421,6 +1346,7 @@ src="${project.build.directory}/${project.artifactId}-${revision}-javadoc.jar" prefix="api" /> + diff --git a/spring-boot-project/spring-boot-docs/src/main/asciidoc/documentation-overview.adoc b/spring-boot-project/spring-boot-docs/src/main/asciidoc/documentation-overview.adoc index aabedda6f5..07cea6a61d 100644 --- a/spring-boot-project/spring-boot-docs/src/main/asciidoc/documentation-overview.adoc +++ b/spring-boot-project/spring-boot-docs/src/main/asciidoc/documentation-overview.adoc @@ -12,14 +12,8 @@ as a map for the rest of the document. [[boot-documentation-about]] == About the Documentation -The Spring Boot reference guide is available as - -* {spring-boot-docs}/html[HTML] -* {spring-boot-docs}/pdf/spring-boot-reference.pdf[PDF] -* {spring-boot-docs}/epub/spring-boot-reference.epub[EPUB] - The latest copy -is available at {spring-boot-docs-current}. +of the reference documentation is available at {spring-boot-docs-current}. Copies of this document may be made for your own use and for distribution to others, provided that you do not charge any fee for such copies and further provided that each diff --git a/spring-boot-project/spring-boot-parent/pom.xml b/spring-boot-project/spring-boot-parent/pom.xml index ec43faa4de..1c9a54ad4d 100644 --- a/spring-boot-project/spring-boot-parent/pom.xml +++ b/spring-boot-project/spring-boot-parent/pom.xml @@ -294,7 +294,7 @@ org.asciidoctor asciidoctor-maven-plugin - 1.5.5 + 1.5.7.1 org.apache.maven.plugins @@ -313,6 +313,11 @@ maven-plugin-plugin 3.5 + + org.apache.maven.plugins + maven-resources-plugin + 3.1.0 + org.apache.maven.plugins maven-site-plugin