Maven Javadoc Plugin
  1. Maven Javadoc Plugin
  2. MJAVADOC-225

The plugin should be able to generate a jar of the aggregated javadoc

    Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.5
    • Fix Version/s: 2.6
    • Labels:
      None
    • Environment:
      Windows
    • Number of attachments :
      0

      Description

      The javadoc:jar goal does not jar the aggregated java in a multi-module project. It would be really nice if it did.

        Activity

        Hide
        Todd Thiessen added a comment -

        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>

        Show
        Todd Thiessen added a comment - 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>
        Hide
        Todd Thiessen added a comment -

        Note. The assembly plugin added to the parent pom of your multi-module project.

        Show
        Todd Thiessen added a comment - Note. The assembly plugin added to the parent pom of your multi-module project.
        Hide
        Vincent Siveton added a comment -

        Added two new goals: aggregate-jar and test-aggregate-jar in r748858
        Snapshot deployed

        Show
        Vincent Siveton added a comment - Added two new goals: aggregate-jar and test-aggregate-jar in r748858 Snapshot deployed

          People

          • Assignee:
            Vincent Siveton
            Reporter:
            Todd Thiessen
          • Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: