From 2355cbdc6eaca6f51aa46ae0505c3c853aae86ca Mon Sep 17 00:00:00 2001 From: Marcin Grzejszczak Date: Mon, 25 May 2020 12:18:20 +0200 Subject: [PATCH] Improved the way the zipped docs are pushed; fixes gh-166 --- docs/pom.xml | 3 + docs/src/main/asciidoc/README.adoc | 11 ++-- pom.xml | 92 +++++++++++------------------- 3 files changed, 41 insertions(+), 65 deletions(-) diff --git a/docs/pom.xml b/docs/pom.xml index edc076ef..50f5da67 100644 --- a/docs/pom.xml +++ b/docs/pom.xml @@ -272,6 +272,9 @@ org.apache.maven.plugins maven-antrun-plugin + + maven-deploy-plugin + diff --git a/docs/src/main/asciidoc/README.adoc b/docs/src/main/asciidoc/README.adoc index 24ae217c..bb53f391 100644 --- a/docs/src/main/asciidoc/README.adoc +++ b/docs/src/main/asciidoc/README.adoc @@ -98,22 +98,21 @@ approach of generating documentation just add these plugins to your `docs` modul org.apache.maven.plugins maven-antrun-plugin <6> - - org.codehaus.mojo - build-helper-maven-plugin <7> - + + maven-deploy-plugin <7> + ---- -<2> This plugin downloads sets up all the git information of the project +<1> This plugin downloads sets up all the git information of the project <2> This plugin downloads the resources of the `spring-cloud-build-docs` module <3> This plugin unpacks the resources of the `spring-cloud-build-docs` module <4> This plugin generates an `adoc` file with all the configuration properties from the classpath <5> This plugin is required to parse the Asciidoctor documentation <6> This plugin is required to copy resources into proper final destinations and to generate main README.adoc and to assert that no files use unresolved links -<7> This plugin ensures that the generated zip docs are attached as an artifact and will get published +<7> This plugin ensures that the generated zip docs will get published IMPORTANT: The order of plugin declaration is important! diff --git a/pom.xml b/pom.xml index 77907059..238b10d0 100644 --- a/pom.xml +++ b/pom.xml @@ -109,6 +109,9 @@ ${project.build.directory}/generated-docs/reference/pdf false false + 2.7 + repo.spring.io + https://repo.spring.io/libs-snapshot-local @@ -754,6 +757,9 @@ https://repo.spring.io/libs-milestone-local + + https://repo.spring.io/libs-milestone-local + bintray @@ -787,6 +793,9 @@ + + https://repo.spring.io/libs-release-local + guides @@ -1111,8 +1120,8 @@ ${version-type}@ - ${docs-url}@ - ${raw-docs-url}@ + https://docs.spring.io/${docs.main}/${project.version}@ + ${github-raw}@ ${project.version}@ ${docs.main}@ @@ -1335,68 +1344,11 @@ input="${git.branch}" regexp="origin/(.*)" replace="\1"/> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - org.codehaus.mojo - build-helper-maven-plugin - ${build-helper-maven-plugin.version} - - - attach-zip - package - - attach-artifact - - - - - - ${project.build.directory}/${project.artifactId}-${project.version}.zip - - zip;zip.type=docs;zip.deployed=false; - - - - - - org.jfrog.buildinfo artifactory-maven-plugin @@ -1423,6 +1375,28 @@ + + maven-deploy-plugin + ${maven-deploy-plugin.version} + + + upload-docs-zip + deploy + + deploy-file + + + ${project.groupId} + ${project.artifactId} + ${project.version} + ${maven-deploy-plugin.deployZipRepositoryId} + ${maven-deploy-plugin.deployZipUrl} + ${project.build.directory}/${project.artifactId}-${project.version}.zip + zip;zip.type=docs;zip.deployed=false; + + + +