質問

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?

役に立ちましたか?

解決

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

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top