Details
-
Type:
Improvement
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 2.5
-
Fix Version/s: 2.6
-
Labels:None
-
Environment:Windows
-
Number of attachments :
Description
The javadoc:jar goal does not jar the aggregated java in a multi-module project. It would be really nice if it did.
You can jar the aggregated javadocs yourself. In your parent POM, declare the following descriptor file:
<assembly>
<id>aggregated-javadoc</id>
<formats>
<format>jar</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
<moduleSets>
<moduleSet>
<includeSubModules>false</includeSubModules>
</moduleSet>
</moduleSets>
<fileSets>
<fileSet>
<directory>target/site/apidocs</directory>
</fileSet>
</fileSets>
</assembly>
I saved this in src/assemble/assembleAggregatedJavadoc.xml
Then add the assembly plugin to your POM with this configuration:
<plugin>
<inherited>false</inherited>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2-beta-3</version>
<executions>
<execution>
<id>jar-aggregated-javadoc</id>
<phase>package</phase>
<configuration>
<descriptors>
<descriptor>src/assemble/assembleAggregatedJavadoc.xml</descriptor>
</descriptors>
</configuration>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>