6

We use a custom doclet to generate a report from custom javadoc tags, and use the Maven site plugin and javadoc plugin to generate both this report and the regular java API docs.

The section of the POM looks like this:

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-javadoc-plugin</artifactId>
    <reportSets>
        <reportSet>
            <id>html</id>
            <reports>
                <report>javadoc</report>
            </reports>
        </reportSet>
        <reportSet>
            <id>custom_report</id>
            <configuration>
                ...
            </configuration>
            <reports>
                <report>javadoc</report>
            </reports>
        </reportSet>
    </reportSets>
</plugin>

Under Maven 2, this works fine, but in Maven 3 only one report is generated, that being the last one specified in the POM (confimed by swapping the reportSet elements).

After some experimenting I discovered that if I changed the regular report's goal from "javadoc" to "test-javadoc", then I got output from both report sets. So the problem seems to be that with Maven 3 I can't generate two reports that use the same javadoc-plugin goal.

Is this a bug, or is there some congifuration I've missed? I moved the maven-javadoc-plugin setup from reporting to the configuration of the site plugin as described at http://maven.apache.org/plugins/maven-site-plugin-3.0-beta-3/maven-3.html, to no avail. I'm using Maven 3.0.4, maven-site-plugin 3.0-beta-3 and maven-javadoc-plugin 2.8.1.

Thanks!

Jean-Rémy Revy
  • 5,431
  • 3
  • 36
  • 64
Richard
  • 133
  • 8
  • 1
    First try to update the maven-site-plugin to 3.0 http://maven.apache.org/plugins/maven-site-plugin/ – khmarbaise Apr 04 '12 at 10:39
  • Same problem with 3.0: I went to 3.0-beta-3 as that matched the version used in the examples I could find. – Richard Apr 12 '12 at 08:01
  • 1
    Did you crack this in the end? Thanks for posting that test-javadoc works, I hadn't figured that out for myself (I've found the same issue you report above) – user1180316 Jul 25 '12 at 15:55

1 Answers1

4

It's a bug in maven-reporting-exec component.

Report sets are kept in a map using the report goal as a key.

j0k
  • 21,914
  • 28
  • 75
  • 84
Max
  • 56
  • 2