Is there a fool-proof way to generate aggregate Javadocs for a multi-module Maven reactor project in a Jenkins job using the Maven Release Plugin Plugin?
My problem is, after the maven-release-plugin
has updated all POM versions, the next build will break since javadoc:aggregate
fails on the reactor POM, given that the referenced versions of the module artifacts do not yet exist.
My workaround is to run the build once with the maven-javadoc-plugin
disabled, using a profile. Then after re-enabling the maven-javadoc-plugin
the next build will pass.
This is rather a hack, and I wonder if I'm just missing anything simple...
Here is my maven-javadoc-plugin
configuration from the reactor POM:
<profile>
<id>javadoc</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<executions>
<execution>
<id>aggregate-javadoc</id>
<phase>post-integration-test</phase>
<goals>
<goal>aggregate</goal>
</goals>
</execution>
</executions>
<inherited>false</inherited>
</plugin>
</plugins>
</build>
</profile>