#1827 - Polishing.
Avoid reference to Spring Data build resources. Avoid unnecessary copy steps. Switch to no-fork goal of the Javadoc plugin to avoid re-execution of the entire build chain.
This commit is contained in:
163
pom.xml
163
pom.xml
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>org.springframework.hateoas</groupId>
|
||||
@@ -180,9 +180,6 @@
|
||||
<id>distribute</id>
|
||||
|
||||
<properties>
|
||||
<shared.resources>${project.build.directory}/shared-resources</shared.resources>
|
||||
<generated-asciidoc-sources.directory>${project.build.directory}/generated-asciidoc-sources/source/
|
||||
</generated-asciidoc-sources.directory>
|
||||
<generated-docs.directory>${project.build.directory}/generated-docs</generated-docs.directory>
|
||||
<maven.main.skip>true</maven.main.skip>
|
||||
<maven.test.skip>true</maven.test.skip>
|
||||
@@ -192,45 +189,10 @@
|
||||
<skipTests>true</skipTests>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.data.build</groupId>
|
||||
<artifactId>spring-data-build-resources</artifactId>
|
||||
<version>2.4.5</version>
|
||||
<type>zip</type>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
||||
<plugins>
|
||||
|
||||
<!--
|
||||
Unpacks the content of spring-data-build-resources into the shared resources folder.
|
||||
-->
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>unpack-shared-resources</id>
|
||||
<goals>
|
||||
<goal>unpack-dependencies</goal>
|
||||
</goals>
|
||||
<phase>generate-resources</phase>
|
||||
<configuration>
|
||||
<includeGroupIds>${project.groupId}</includeGroupIds>
|
||||
<includeArtifactIds>spring-data-build-resources</includeArtifactIds>
|
||||
<includeTypes>zip</includeTypes>
|
||||
<excludeTransitive>true</excludeTransitive>
|
||||
<outputDirectory>${shared.resources}</outputDirectory>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<!--
|
||||
Configures JavaDoc generation.
|
||||
-->
|
||||
@@ -242,7 +204,7 @@
|
||||
<execution>
|
||||
<id>aggregate-javadoc</id>
|
||||
<goals>
|
||||
<goal>aggregate</goal>
|
||||
<goal>aggregate-no-fork</goal>
|
||||
</goals>
|
||||
<phase>package</phase>
|
||||
<configuration>
|
||||
@@ -258,75 +220,22 @@
|
||||
<version>1.8</version>
|
||||
<executions>
|
||||
|
||||
<execution>
|
||||
<id>copy-documentation-resources</id>
|
||||
<phase>generate-resources</phase>
|
||||
<configuration>
|
||||
<target>
|
||||
<copy todir="target/site/reference/html/images">
|
||||
<fileset dir="${basedir}/src/main/asciidoc" erroronmissingdir="false">
|
||||
<include name="**/*.png"/>
|
||||
<include name="**/*.gif"/>
|
||||
<include name="**/*.jpg"/>
|
||||
</fileset>
|
||||
<flattenmapper/>
|
||||
</copy>
|
||||
</target>
|
||||
</configuration>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
|
||||
<execution>
|
||||
<id>create-generated-docs-resources</id>
|
||||
<phase>process-resources</phase>
|
||||
<configuration>
|
||||
<target>
|
||||
<copy failonerror="false" todir="${generated-asciidoc-sources.directory}/">
|
||||
<fileset dir="src/main/asciidoc" includes="**/*.adoc"/>
|
||||
</copy>
|
||||
<copy failonerror="false"
|
||||
todir="${generated-asciidoc-sources.directory}/images/">
|
||||
<fileset dir="src/main/asciidoc/images"/>
|
||||
</copy>
|
||||
|
||||
<copy todir="${generated-docs.directory}">
|
||||
<fileset dir="${generated-asciidoc-sources.directory}">
|
||||
<include name="css/**"/>
|
||||
<include name="js/**"/>
|
||||
</fileset>
|
||||
</copy>
|
||||
</target>
|
||||
</configuration>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
|
||||
<execution>
|
||||
<id>rename-reference-docs</id>
|
||||
<phase>prepare-package</phase>
|
||||
<phase>package</phase>
|
||||
<configuration>
|
||||
<target>
|
||||
|
||||
<!-- Copy files for the single-file HTML version -->
|
||||
<copy failonerror="false"
|
||||
todir="target/site/reference/html/images">
|
||||
todir="target/site/reference/html/images">
|
||||
<fileset dir="${generated-docs.directory}/images"/>
|
||||
</copy>
|
||||
|
||||
<!-- Copy shared resources. Spring Data ones first to override the ones shared -->
|
||||
<copy failonerror="false" todir="target/site/reference/html/">
|
||||
<fileset dir="${shared.resources}">
|
||||
<include name="css/**"/>
|
||||
<include name="js/**"/>
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<copy failonerror="false" todir="target/site/reference/html/">
|
||||
<fileset dir="${generated-asciidoc-sources.directory}">
|
||||
<fileset dir="${generated-docs.directory}">
|
||||
<include name="css/**"/>
|
||||
<include name="img/**"/>
|
||||
<include name="js/**"/>
|
||||
</fileset>
|
||||
</copy>
|
||||
@@ -335,10 +244,6 @@
|
||||
<fileset dir="${generated-docs.directory}" includes="*.html"/>
|
||||
</copy>
|
||||
|
||||
<!-- Copy and rename the PDF file -->
|
||||
<copy failonerror="false" file="${generated-docs.directory}/index.pdf"
|
||||
tofile="target/site/reference/pdf/spring-hateoas-reference.pdf"/>
|
||||
|
||||
</target>
|
||||
</configuration>
|
||||
<goals>
|
||||
@@ -362,23 +267,18 @@
|
||||
<dependency>
|
||||
<groupId>org.jruby</groupId>
|
||||
<artifactId>jruby</artifactId>
|
||||
<version>9.2.19.0</version>
|
||||
<version>9.3.7.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.asciidoctor</groupId>
|
||||
<artifactId>asciidoctorj</artifactId>
|
||||
<version>2.5.3</version>
|
||||
<version>2.5.5</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.asciidoctor</groupId>
|
||||
<artifactId>asciidoctorj-pdf</artifactId>
|
||||
<version>1.6.2</version>
|
||||
<groupId>io.spring.asciidoctor.backends</groupId>
|
||||
<artifactId>spring-asciidoctor-backends</artifactId>
|
||||
<version>${spring-asciidoctor-backends.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.spring.asciidoctor.backends</groupId>
|
||||
<artifactId>spring-asciidoctor-backends</artifactId>
|
||||
<version>${spring-asciidoctor-backends.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<executions>
|
||||
@@ -390,41 +290,18 @@
|
||||
<goal>process-asciidoc</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<sourceDirectory>${generated-asciidoc-sources.directory}</sourceDirectory>
|
||||
<sourceDocumentName>index.adoc</sourceDocumentName>
|
||||
<backend>spring-html</backend>
|
||||
<backend>spring-html</backend>
|
||||
<outputDirectory>${generated-docs.directory}</outputDirectory>
|
||||
<sourceHighlighter>highlight.js</sourceHighlighter>
|
||||
<attributes>
|
||||
<highlightjsdir>js/highlight</highlightjsdir>
|
||||
<highlightjs-theme>github</highlightjs-theme>
|
||||
<linkcss>true</linkcss>
|
||||
<sectanchors>true</sectanchors>
|
||||
<stylesdir>./css</stylesdir>
|
||||
<stylesheet>site.css</stylesheet>
|
||||
<toc>left</toc>
|
||||
</attributes>
|
||||
</configuration>
|
||||
</execution>
|
||||
|
||||
<!-- Requires a fix to Javadoc generation first otherwise build duration explodes
|
||||
<execution>
|
||||
<id>pdf</id>
|
||||
<phase>compile</phase>
|
||||
<goals>
|
||||
<goal>process-asciidoc</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<sourceDirectory>${generated-asciidoc-sources.directory}</sourceDirectory>
|
||||
<sourceDocumentName>index.adoc</sourceDocumentName>
|
||||
<backend>pdf</backend>
|
||||
<outputDirectory>${generated-docs.directory}</outputDirectory>
|
||||
<sourceHighlighter>coderay</sourceHighlighter>
|
||||
</configuration>
|
||||
</execution>
|
||||
|
||||
-->
|
||||
|
||||
</executions>
|
||||
|
||||
<configuration>
|
||||
@@ -1176,21 +1053,13 @@
|
||||
<enabled>false</enabled>
|
||||
</releases>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>spring-release</id>
|
||||
<name>Spring Releases</name>
|
||||
<url>https://repo.spring.io/release</url>
|
||||
<snapshots>
|
||||
<enabled>false</enabled>
|
||||
</snapshots>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
<pluginRepositories>
|
||||
<pluginRepository>
|
||||
<id>spring-plugins-release</id>
|
||||
<url>https://repo.spring.io/plugins-release</url>
|
||||
</pluginRepository>
|
||||
<pluginRepository>
|
||||
<id>spring-plugins-release</id>
|
||||
<url>https://repo.spring.io/plugins-release</url>
|
||||
</pluginRepository>
|
||||
<pluginRepository>
|
||||
<id>bintray-plugins</id>
|
||||
<name>bintray-plugins</name>
|
||||
|
||||
Reference in New Issue
Block a user