Question

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!

Was it helpful?

Solution

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

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top