From d4fefdcd77612933bb7d6e482df02d78411b1a5b Mon Sep 17 00:00:00 2001 From: Marcin Grzejszczak Date: Thu, 4 Jun 2020 13:11:04 +0200 Subject: [PATCH] Migrating to the docs.spring.io --- README.adoc | 137 +++++++------- docs/pom.xml | 143 +++------------ .../cloud/internal/Main.groovy | 112 ------------ .../springframework/cloud/internal/Main.java | 151 ++++++++++++++++ .../asciidoctor/CoalescerPreprocessor.java | 126 +++++++++++++ .../internal/asciidoctor/ReadmeMain.java | 61 +++++++ pom.xml | 170 +++++++++--------- 7 files changed, 524 insertions(+), 376 deletions(-) delete mode 100644 docs/src/main/groovy/org/springframework/cloud/internal/Main.groovy create mode 100644 docs/src/main/java/org/springframework/cloud/internal/Main.java create mode 100644 docs/src/main/java/org/springframework/cloud/internal/asciidoctor/CoalescerPreprocessor.java create mode 100644 docs/src/main/java/org/springframework/cloud/internal/asciidoctor/ReadmeMain.java diff --git a/README.adoc b/README.adoc index 3b22304f..03c4d3ad 100644 --- a/README.adoc +++ b/README.adoc @@ -4,6 +4,7 @@ Manual changes to this file will be lost when it is generated again. Edit the files in the src/main/asciidoc/ directory instead. //// + image:https://circleci.com/gh/spring-cloud/spring-cloud-build.svg?style=svg[link="https://travis-ci.org/spring-cloud/spring-cloud-build"] Spring Cloud Build is a common utility project for Spring Cloud @@ -254,38 +255,38 @@ approach of generating documentation just add these plugins to your `docs` modul [source,xml] ---- - - docs - - - - pl.project13.maven - git-commit-id-plugin <1> - - - org.apache.maven.plugins - maven-dependency-plugin <2> - - - org.apache.maven.plugins - maven-resources-plugin <3> - - - org.codehaus.mojo - exec-maven-plugin <4> - - - org.asciidoctor - asciidoctor-maven-plugin <5> - - - org.apache.maven.plugins - maven-antrun-plugin <6> - - - - - + + docs + + + + pl.project13.maven + git-commit-id-plugin <1> + + + org.apache.maven.plugins + maven-dependency-plugin <2> + + + org.apache.maven.plugins + maven-resources-plugin <3> + + + org.codehaus.mojo + exec-maven-plugin <4> + + + org.asciidoctor + asciidoctor-maven-plugin <5> + + + org.apache.maven.plugins + maven-antrun-plugin <6> + + + + + ---- <2> 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 @@ -305,42 +306,42 @@ Spring Cloud Build Docs comes with a set of attributes for asciidoctor that you [source,xml] ---- - shared - true - - left - 4 - true - ${project.basedir}/src@ - ${project.basedir}/src/main/asciidoc@ - ${project.basedir}/target/generated-resources@ - - - - ${maven.multiModuleProjectDirectory}@ - - ${docs.main}@ - - https://raw.githubusercontent.com/spring-cloud/${docs.main}/${github-tag}@ - - https://github.com/spring-cloud/${docs.main}/tree/${github-tag}@ - - https://github.com/spring-cloud/${docs.main}/issues/@ - https://github.com/spring-cloud/${docs.main}/wiki@ - https://github.com/spring-cloud/${docs.main}/tree/master@ - - ${index-link}@ + shared + true + + left + 4 + true + ${project.basedir}/src@ + ${project.basedir}/src/main/asciidoc@ + ${project.basedir}/target/generated-resources@ + + + + ${maven.multiModuleProjectDirectory}@ + + ${docs.main}@ + + https://raw.githubusercontent.com/spring-cloud/${docs.main}/${github-tag}@ + + https://github.com/spring-cloud/${docs.main}/tree/${github-tag}@ + + https://github.com/spring-cloud/${docs.main}/issues/@ + https://github.com/spring-cloud/${docs.main}/wiki@ + https://github.com/spring-cloud/${docs.main}/tree/master@ + + ${index-link}@ - - - ${project.version}@ - ${project.version}@ - ${github-tag}@ - ${version-type}@ - https://docs.spring.io/${docs.main}/docs/${project.version}@ - ${github-raw}@ - ${project.version}@ - ${docs.main}@ + + + ${project.version}@ + ${project.version}@ + ${github-tag}@ + ${version-type}@ + https://docs.spring.io/${docs.main}/docs/${project.version}@ + ${github-raw}@ + ${project.version}@ + ${docs.main}@ ---- @@ -373,4 +374,4 @@ what will happen is that for GA project versions, we will clone `gs-guide1`, `gs You can skip this by either not adding the `guides` profile, or passing the `-DskipGuides` system property when the profile is turned on. -You can configure the project version passed to guides via the `guides-project.version` (defaults to `${project.version}`). The phase at which guides get updated can be configured by `guides-update.phase` (defaults to `deploy`). \ No newline at end of file +You can configure the project version passed to guides via the `guides-project.version` (defaults to `${project.version}`). The phase at which guides get updated can be configured by `guides-update.phase` (defaults to `deploy`). diff --git a/docs/pom.xml b/docs/pom.xml index 1f46b9b0..76ba278b 100644 --- a/docs/pom.xml +++ b/docs/pom.xml @@ -14,16 +14,14 @@ spring-cloud-build - - 2.1.x,2.2.x ${basedir}/.. - 1.8.1 - 2.5.10 - - ${groovy.version} none + none ${project.basedir}/src/main/ + deploy + + maven.compile.classpath @@ -39,63 +37,15 @@ compile - org.codehaus.groovy - groovy-all - ${groovy.version} - pom - - - org.codehaus.groovy - groovy - ${groovy.version} + com.fasterxml.jackson.core + jackson-databind compile + - org.codehaus.groovy - groovy-xml - ${groovy.version} - compile - - - org.codehaus.groovy - groovy-datetime - ${groovy.version} - compile - - - org.codehaus.groovy - groovy-nio - ${groovy.version} - compile - - - org.codehaus.groovy - groovy-json - ${groovy.version} - compile - - - org.codehaus.groovy - groovy-jsr223 - ${groovy.version} - compile - - - org.codehaus.groovy - groovy-macro - ${groovy.version} - compile - - - org.codehaus.groovy - groovy-sql - ${groovy.version} - compile - - - org.codehaus.groovy - groovy-swing - ${groovy.version} + org.asciidoctor + asciidoctorj + ${asciidoctorj.version} compile @@ -109,42 +59,26 @@ src/main - groovy/**/*.* + java/**/*.* - org.codehaus.mojo - build-helper-maven-plugin - ${build-helper-maven-plugin.version} + org.apache.maven.plugins + maven-assembly-plugin + 3.3.0 + + + jar-with-dependencies + + - add-source - generate-sources + make-assembly + package - add-source - - - - src/main/groovy - - - - - - - org.codehaus.gmavenplus - gmavenplus-plugin - ${gmavenplus-plugin.version} - - - - compile - addSources - generateStubs - generateTestStubs - groovydoc-jar + single @@ -184,35 +118,12 @@ org.apache.maven.plugins maven-antrun-plugin - - - - - unix - - - unix - Linux - - - - - exec-maven-plugin - org.codehaus.mojo - - - Run tests - test - - exec - - - ${skipTests} - ${basedir}/src/test/bash/run-bats.sh - - - + maven-deploy-plugin + + deploy + deploy-file + diff --git a/docs/src/main/groovy/org/springframework/cloud/internal/Main.groovy b/docs/src/main/groovy/org/springframework/cloud/internal/Main.groovy deleted file mode 100644 index 7b07ffb4..00000000 --- a/docs/src/main/groovy/org/springframework/cloud/internal/Main.groovy +++ /dev/null @@ -1,112 +0,0 @@ -package org.springframework.cloud.internal - -import java.util.regex.Pattern - -import groovy.json.JsonSlurper -import groovy.transform.CompileStatic - -import org.springframework.core.io.Resource -import org.springframework.core.io.support.PathMatchingResourcePatternResolver - -/** - * @author Marcin Grzejszczak - */ -class Main { - - @CompileStatic - static void main(String... args) { - String outputFile = args[0] - String inclusionPattern = args.length > 1 ? args[1] : ".*" - File parent = new File(outputFile).parentFile - if (!parent.exists()) { - println "No parent directory [${parent.toString()}] found. Won't generate the configuration properties file" - return - } - new Generator().generate(outputFile, inclusionPattern) - } - - static class Generator { - void generate(String outputFile, String inclusionPattern) { - println "Parsing all configuration metadata" - Resource[] resources = getResources() - println "Found [${resources.length}] configuration metadata jsons" - TreeSet names = new TreeSet() - def descriptions = [:] - int count = 0 - int matchingPropertyCount = 0 - int propertyCount = 0 - Pattern pattern = Pattern.compile(inclusionPattern) - resources.each { Resource resource -> - if (resourceNameContainsPattern(resource)) { - count++ - def slurper = new JsonSlurper() - slurper.parseText(resource.inputStream.text).properties.each { val -> - propertyCount++ - if (!pattern.matcher(val.name).matches()) { - return - } - matchingPropertyCount++ - names.add val.name - descriptions[val.name] = new ConfigValue(val.name, val.description, val.defaultValue) - } - } - } - println "Found [${count}] Cloud projects configuration metadata jsons. [${matchingPropertyCount}/${propertyCount}] were matching the pattern [${inclusionPattern}]" - println "Successfully built the description table" - if (names.empty) { - println("Will not update the table, since no configuration properties were found!") - return - } - new File(outputFile).text = """\ -|=== -|Name | Default | Description - -${names.collect { it -> return descriptions[it] }.join("\n")} - -|=== -""" - println "Successfully stored the output file" - } - - protected boolean resourceNameContainsPattern(Resource resource) { - try { - return resource.getURL().toString().contains("cloud") - } - catch (Exception e) { - println("Exception [${e}] for resource [${resource}] occurred while trying to retrieve its URL") - return false - } - } - - protected Resource[] getResources() { - return new PathMatchingResourcePatternResolver() - .getResources("classpath*:/META-INF/spring-configuration-metadata.json") - } - - } - - - @CompileStatic - static class ConfigValue { - String name - String description - Object defaultValue - - ConfigValue() {} - - ConfigValue(String name, String description, Object defaultValue) { - this.name = name - this.description = escapedValue(description) - this.defaultValue = escapedValue(defaultValue) - } - - private String escapedValue(Object value) { - return value != null ? - value.toString().replaceAll('\\|', '\\\\|') : '' - } - - String toString() { - "|${name} | ${defaultValue} | ${description}" - } - } -} diff --git a/docs/src/main/java/org/springframework/cloud/internal/Main.java b/docs/src/main/java/org/springframework/cloud/internal/Main.java new file mode 100644 index 00000000..39389391 --- /dev/null +++ b/docs/src/main/java/org/springframework/cloud/internal/Main.java @@ -0,0 +1,151 @@ +/* + * Copyright 2012-2020 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.springframework.cloud.internal; + +import java.io.File; +import java.io.IOException; +import java.nio.file.Files; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.TreeSet; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.regex.Pattern; +import java.util.stream.Collectors; + +import com.fasterxml.jackson.databind.ObjectMapper; + +import org.springframework.core.io.Resource; +import org.springframework.core.io.support.PathMatchingResourcePatternResolver; +import org.springframework.util.StreamUtils; + +/** + * @author Marcin Grzejszczak + */ +public class Main { + + public static void main(String... args) { + String outputFile = args[0]; + String inclusionPattern = args.length > 1 ? args[1] : ".*"; + File parent = new File(outputFile).getParentFile(); + if (!parent.exists()) { + System.out.println("No parent directory [" + parent.toString() + + "] found. Will not generate the configuration properties file"); + return; + } + new Generator().generate(outputFile, inclusionPattern); + } + + static class Generator { + + void generate(String outputFile, String inclusionPattern) { + try { + System.out.println("Parsing all configuration metadata"); + Resource[] resources = getResources(); + System.out.println("Found [" + resources.length + "] configuration metadata jsons"); + TreeSet names = new TreeSet<>(); + Map descriptions = new HashMap<>(); + final AtomicInteger count = new AtomicInteger(); + final AtomicInteger matchingPropertyCount = new AtomicInteger(); + final AtomicInteger propertyCount = new AtomicInteger(); + Pattern pattern = Pattern.compile(inclusionPattern); + for (Resource resource : resources) { + if (resourceNameContainsPattern(resource)) { + count.incrementAndGet(); + byte[] bytes = StreamUtils.copyToByteArray(resource.getInputStream()); + Map response = new ObjectMapper().readValue(bytes, HashMap.class); + List> properties = (List>) response.get("properties"); + properties.forEach(val -> { + propertyCount.incrementAndGet(); + String name = String.valueOf(val.get("name")); + if (!pattern.matcher(name).matches()) { + return; + } + String description = String.valueOf(val.get("description")); + Object defaultValue = val.get("defaultValue"); + matchingPropertyCount.incrementAndGet(); + names.add(name); + descriptions.put(name, new ConfigValue(name, description, defaultValue)); + }); + } + } + System.out.println( + "Found [" + count + "] Cloud projects configuration metadata jsons. [" + matchingPropertyCount + + "/" + propertyCount + "] were matching the pattern [" + inclusionPattern + "]"); + System.out.println("Successfully built the description table"); + if (names.isEmpty()) { + System.out.println("Will not update the table, since no configuration properties were found!"); + return; + } + Files.write(new File(outputFile).toPath(), + ("|===\n" + + "|Name | Default | Description\n\n" + names.stream() + .map(it -> descriptions.get(it).toString()).collect(Collectors.joining("\n")) + + "\n\n" + "|===").getBytes()); + System.out.println("Successfully stored the output file"); + } + catch (IOException e) { + throw new IllegalStateException(e); + } + } + + protected boolean resourceNameContainsPattern(Resource resource) { + try { + return resource.getURL().toString().contains("cloud"); + } + catch (Exception e) { + System.out.println("Exception [" + e + "] for resource [" + resource + + "] occurred while trying to retrieve its URL"); + return false; + } + } + + protected Resource[] getResources() throws IOException { + return new PathMatchingResourcePatternResolver() + .getResources("classpath*:/META-INF/spring-configuration-metadata.json"); + } + + } + + static class ConfigValue { + + public String name; + + public String description; + + public Object defaultValue; + + ConfigValue() { + } + + ConfigValue(String name, String description, Object defaultValue) { + this.name = name; + this.description = escapedValue(description); + this.defaultValue = escapedValue(defaultValue); + } + + private String escapedValue(Object value) { + return value != null ? value.toString().replaceAll("\\|", "\\\\|") : ""; + } + + public String toString() { + return "|" + name + " | " + defaultValue + " | " + description; + } + + } + +} diff --git a/docs/src/main/java/org/springframework/cloud/internal/asciidoctor/CoalescerPreprocessor.java b/docs/src/main/java/org/springframework/cloud/internal/asciidoctor/CoalescerPreprocessor.java new file mode 100644 index 00000000..f20395b8 --- /dev/null +++ b/docs/src/main/java/org/springframework/cloud/internal/asciidoctor/CoalescerPreprocessor.java @@ -0,0 +1,126 @@ +/* + * Copyright 2012-2020 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.springframework.cloud.internal.asciidoctor; + +import java.io.File; +import java.io.IOException; +import java.nio.file.Files; +import java.util.Arrays; +import java.util.LinkedList; +import java.util.List; + +import org.asciidoctor.ast.Document; +import org.asciidoctor.extension.Preprocessor; +import org.asciidoctor.extension.PreprocessorReader; + +// taken from https://github.com/hibernate/hibernate-asciidoctor-extensions/blob/1.0.3.Final/src/main/java/org/hibernate/infra/asciidoctor/extensions/savepreprocessed/SavePreprocessedOutputPreprocessor.java +/** + * Preprocessor used to save the preprocessed output of the asciidoctor conversion. It allows to generate a single file + * integrating all the includes. + * + * @author Guillaume Smet + */ +class CoalescerPreprocessor extends Preprocessor { + + private final File outputFile; + + private static final List FILTER_LICENSE_MARKERS = Arrays.asList("[preface]", "<<<"); + + private static final String COMMENT_MARKER = "//"; + + private static final String SOURCE_MARKER = "[source"; + + private static final List SECTION_MARKERS = Arrays.asList("----", "...."); + + private static final String HEADER = "////\n" + "DO NOT EDIT THIS FILE. IT WAS GENERATED.\n" + + "Manual changes to this file will be lost when it is generated again.\n" + + "Edit the files in the src/main/asciidoc/ directory instead.\n" + "////\n\n"; + + CoalescerPreprocessor(File output_file) { + outputFile = output_file; + } + + @Override + public void process(Document document, PreprocessorReader preprocessorReader) { + try { + LinkedList filteredLines = filterLines(preprocessorReader.readLines()); + filteredLines.addFirst(HEADER); + Files.write(outputFile.toPath(), filteredLines); + } + catch (IOException e) { + throw new IllegalStateException("Unable to write the preprocessed file " + outputFile, e); + } + } + + /** + * This is used to filter out the license headers that are just after the markers + * defined. It also reindents the source code with spaces to be consistent with the + * 1.1 spec. + */ + private LinkedList filterLines(List lines) { + LinkedList filteredLines = new LinkedList<>(); + ParsingState state = ParsingState.NORMAL; + int counter = 0; + for (String line : lines) { + counter++; + switch (state) { + case NORMAL: + if (FILTER_LICENSE_MARKERS.contains(line)) { + state = ParsingState.FILTER_LICENSE; + } + else if (line.startsWith(SOURCE_MARKER)) { + state = ParsingState.SOURCE; + } + break; + case SOURCE: + if (SECTION_MARKERS.contains(line)) { + state = ParsingState.SOURCE_CONTENT; + } + else { + System.err.println("[source] requires to be followed by a section marker and line number [" + counter + "] with content [" + line + "] doesn't have it"); + } + break; + case SOURCE_CONTENT: + if (SECTION_MARKERS.contains(line)) { + state = ParsingState.NORMAL; + } + else { + filteredLines.add(line.replaceAll("\t", " ")); + continue; + } + break; + case FILTER_LICENSE: + if (line.startsWith(COMMENT_MARKER)) { + continue; + } + else { + state = ParsingState.NORMAL; + } + break; + } + filteredLines.add(line); + } + return filteredLines; + } + + private enum ParsingState { + + NORMAL, FILTER_LICENSE, SOURCE, SOURCE_CONTENT, + + } + +} diff --git a/docs/src/main/java/org/springframework/cloud/internal/asciidoctor/ReadmeMain.java b/docs/src/main/java/org/springframework/cloud/internal/asciidoctor/ReadmeMain.java new file mode 100644 index 00000000..5f51c70c --- /dev/null +++ b/docs/src/main/java/org/springframework/cloud/internal/asciidoctor/ReadmeMain.java @@ -0,0 +1,61 @@ +/* + * Copyright 2012-2020 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.springframework.cloud.internal.asciidoctor; + +import java.io.File; +import java.io.IOException; +import java.nio.file.Files; + +import org.asciidoctor.Asciidoctor; +import org.asciidoctor.Attributes; +import org.asciidoctor.Options; +import org.asciidoctor.SafeMode; + +public class ReadmeMain { + public static void main(String... args) { + File inputFile = new File(args[0]); + File outputFile = new File(args[1]); + System.out.println("Will do the Readme conversion from [" + inputFile + "] to [" + outputFile + "]"); + new ReadmeMain().convert(inputFile, outputFile); + } + + void convert(File input, File output) { + Asciidoctor asciidoctor = Asciidoctor.Factory.create(); + asciidoctor.javaExtensionRegistry().preprocessor(new CoalescerPreprocessor(output)); + Options options = options(input, output); + try { + String fileAsString = new String(Files.readAllBytes(input.toPath())); + asciidoctor.convert(fileAsString, options); + System.out.println("Successfully converted the Readme file!\n"); + } catch (IOException ex) { + throw new IllegalStateException("Failed to convert the file", ex); + } + } + + private Options options(File input, File output) { + Attributes attributes = new Attributes(); + attributes.setAllowUriRead(true); + attributes.setAttribute("project-root", output.getParent()); + Options options = new Options(); + options.setSourceDir(input.getParent()); + options.setBaseDir(input.getParent()); + options.setAttributes(attributes); + options.setSafe(SafeMode.UNSAFE); + options.setParseHeaderOnly(true); + return options; + } +} diff --git a/pom.xml b/pom.xml index 420fe5e1..bcd0822b 100644 --- a/pom.xml +++ b/pom.xml @@ -31,16 +31,17 @@ 2.3.0.RELEASE 2.3.1.BUILD-SNAPSHOT ${project.build.directory}/build-docs + ${project.build.directory}/build-docs-classes ${project.build.directory}/refdocs/ - 0.2.1.RELEASE - 0.1.3.RELEASE + 0.2.2.RELEASE + 0.2.0.RELEASE 1.5.0-alpha.18 - 1.5.18 + 2.0.2 ${project.version} deploy ${project.version} - 1.5.8 + 2.1.0 9.2.7.0 @@ -71,7 +72,7 @@ 3.0.0-M2 1.6 3.1.1 - 1.5.8 + 1.6.0 3.0.0 2.2.1 1.16 @@ -101,10 +102,17 @@ ${project.basedir}/src/main/asciidoc/_configprops.adoc .* generate-resources + generate-resources generate-resources ${project.build.directory}/generated-docs/reference/html ${project.build.directory}/generated-docs/reference/htmlsingle ${project.build.directory}/generated-docs/reference/pdf + 2.7 + repo.spring.io + https://repo.spring.io/libs-snapshot-local + none + ${docs.classes.dir} + readme.class.path @@ -437,7 +445,6 @@ checkstyle.additional.suppressions.file=${checkstyle.additional.suppressions.file} true - ${maven-checkstyle-plugin.includeTestSourceDirectory} @@ -487,6 +494,7 @@ ${project.build.outputDirectory}/git.properties false + true @@ -752,6 +760,9 @@ https://repo.spring.io/libs-milestone-local + + https://repo.spring.io/libs-milestone-local + bintray @@ -785,6 +796,9 @@ + + https://repo.spring.io/libs-release-local + guides @@ -962,6 +976,30 @@ + + unpack-classes + ${maven-dependency-plugin-for-docs-classes.phase} + + unpack + + + + + org.springframework.cloud + + spring-cloud-build-docs + + ${spring-cloud-build.version} + + jar-with-dependencies + jar + true + ${docs.classes.dir} + + + + + unpack-docs-resources generate-resources @@ -1107,8 +1145,8 @@ ${project.version}@ ${github-tag}@ ${version-type}@ - ${docs-url}@ - ${raw-docs-url}@ + https://docs.spring.io/${docs.main}/docs/${project.version}@ + ${github-raw}@ ${project.version}@ ${docs.main}@ @@ -1135,13 +1173,14 @@ highlight.js book - js/highlight - atom-one-dark-reasonable - true - ./images - font + shared css/ spring.css + true + font + js/highlight + github + ./images warn @@ -1169,13 +1208,14 @@ highlight.js book - js/highlight - atom-one-dark-reasonable - true - ./images - font + shared css/ spring.css + true + font + js/highlight + github + ./images @@ -1244,16 +1284,20 @@ readme - process-resources + prepare-package run - - - + + + + + + + @@ -1329,68 +1373,11 @@ input="${git.branch}" regexp="origin/(.*)" replace="\1"/> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - org.codehaus.mojo - build-helper-maven-plugin - ${build-helper-maven-plugin.version} - false - - - attach-zip - - attach-artifact - - - - - - ${project.build.directory}/${project.artifactId}-${project.version}.zip - - zip - - - - - - org.jfrog.buildinfo artifactory-maven-plugin @@ -1417,6 +1404,29 @@ + + maven-deploy-plugin + ${maven-deploy-plugin.version} + + + upload-docs-zip + ${upload-docs-zip.phase} + + deploy-file + + + false + ${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; + + + +