0

In a Maven Site build I want to generated an aggregated Javadoc report with links to other Javadocs (detectLinks = true).

In one of the parent POMs I have defined in the reporting section:

<reporting>
    <plugins>
        ...
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>2.9</version> 
            <reportSets>
                <reportSet>
                    <id>default</id>
                    <configuration>
                        <detectOfflineLinks>true</detectOfflineLinks>
                    </configuration>
                    <reports>
                        <report>javadoc</report>
                    </reports>
                </reportSet>
                <reportSet>
                    <id>aggregate</id>
                    <reports>
                        <report>aggregate</report>
                    </reports>
                </reportSet>
            </reportSets>
            <configuration>
                <detectLinks>true</detectLinks>
            </configuration>
        </plugin>
    </plugins>
</reporting>

The effective POM reporting section of the multi-module aggregator project is:

  <reporting>
    <outputDirectory>someDir</outputDirectory>
    <plugins>
      ...
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>2.9</version>
        <reportSets>
          <reportSet>
            <reports>
              <report>javadoc</report>
            </reports>
            <configuration>
              <detectOfflineLinks>true</detectOfflineLinks>
              <detectLinks>true</detectLinks>
            </configuration>
          </reportSet>
          <reportSet>
            <id>aggregate</id>
            <reports>
              <report>aggregate</report>
            </reports>
            <configuration>
              <detectLinks>true</detectLinks>
            </configuration>
          </reportSet>
        </reportSets>
        <configuration>
          <detectLinks>true</detectLinks>
        </configuration>
      </plugin>
    </plugins>
  </reporting>

Still, the detectLinks is only respected for the individual Javadoc reports, but not for the aggregated Javadoc report.

How can I enable detectLinks for aggregated Javadoc reports?

Puce
  • 34,375
  • 9
  • 72
  • 137

1 Answers1

1

The problem is that the aggregate goal checks only the dependencies of the root project, but not the modules. Just created an issue with a patch: http://jira.codehaus.org/browse/MJAVADOC-390

Temporary solution can be to declare your dependencies on the root project... but it is ugly

-- Vazul

Vazul
  • 126
  • 3
  • A new patch is added to [MJAVADOC-390](http://jira.codehaus.org/browse/MJAVADOC-390), I think because of this: [MSITE-171](http://jira.codehaus.org/browse/MSITE-171). – Vazul Apr 01 '14 at 16:46
  • Thanks for reporting the issue and the patch. I missed the deadline for the bounty but I will start a new bounty. – Puce Apr 10 '14 at 20:42