#527 - Tweak JavaDoc aggregation to properly work with Delombok on multi-module projects.

We now write the output of the JavaDoc generation to ${project.root}/target/generated-sources/delombok so that it will always end up in the top level target folder so that the aggregation of JavaDoc for multiple projects can actually find the generated source.

Upgraded the JavaDoc plugin to 3.0.0 and switched to use the additionalJOptions parameter to disable the doclint. Delayed documentation generation to the prepare-package phase. This is due to javadoc:aggregate triggering the compile phase before running which then caused the reference docs to be created twice slowing down the build significantly (mostly due to the PDF generation taking quite a while).
This commit is contained in:
Oliver Gierke
2018-03-14 09:11:09 +01:00
parent ff858553e1
commit 054b1450d5

View File

@@ -275,7 +275,7 @@
<goals>
<goal>unpack-dependencies</goal>
</goals>
<phase>generate-resources</phase>
<phase>prepare-package</phase>
</execution>
</executions>
<configuration>
@@ -302,6 +302,9 @@
<goals>
<goal>delombok</goal>
</goals>
<configuration>
<outputDirectory>${project.root}/target/generated-sources/delombok</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
@@ -316,6 +319,9 @@
<goal>aggregate</goal>
</goals>
<phase>package</phase>
<configuration>
<outputDirectory>${project.root}/target/site/apidocs</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
@@ -358,7 +364,7 @@
<execution>
<id>collect-schema-files</id>
<phase>process-resources</phase>
<phase>prepare-package</phase>
<configuration>
<target>
<copy todir="${project.build.directory}/schemas">
@@ -376,7 +382,7 @@
<execution>
<id>rename-reference-docs</id>
<phase>process-resources</phase>
<phase>package</phase>
<configuration>
<target>
<copy failonerror="false" file="${project.build.directory}/generated-docs/index.pdf" tofile="${project.root}/target/site/reference/pdf/${dist.id}-reference.pdf"/>
@@ -420,7 +426,7 @@
<execution>
<id>html</id>
<phase>generate-resources</phase>
<phase>prepare-package</phase>
<goals>
<goal>process-asciidoc</goal>
</goals>
@@ -438,9 +444,10 @@
</configuration>
</execution>
<!--
<execution>
<id>epub</id>
<phase>generate-resources</phase>
<phase>prepare-package</phase>
<goals>
<goal>process-asciidoc</goal>
</goals>
@@ -452,7 +459,7 @@
<execution>
<id>pdf</id>
<phase>generate-resources</phase>
<phase>prepare-package</phase>
<goals>
<goal>process-asciidoc</goal>
</goals>
@@ -460,7 +467,7 @@
<backend>pdf</backend>
<sourceHighlighter>coderay</sourceHighlighter>
</configuration>
</execution>
</execution>-->
</executions>
@@ -777,7 +784,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.4</version>
<version>3.0.0</version>
</plugin>
<plugin>
@@ -957,7 +964,7 @@
<stylesheetfile>${shared.resources}/javadoc/spring-javadoc.css</stylesheetfile>
<!-- copies doc-files subdirectory which contains image resources -->
<docfilessubdirs>true</docfilessubdirs>
<additionalparam>-Xdoclint:none</additionalparam>
<additionalJOptions>-Xdoclint:none</additionalJOptions>
<sourcepath>target/generated-sources/delombok</sourcepath>
<links>
<link>https://docs.spring.io/spring/docs/5.0.x/javadoc-api/</link>