2014-03-28 25 views
0

在Maven Site的構建中,我想生成一個帶有其他Javadocs(detectLinks = true)鏈接的聚合Javadoc報告。Maven Javadoc報告:聚合和檢測鏈接

在我在報告部分中定義的父POM中的一個:

<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> 

多模塊聚合項目的有效POM報告部分是:

<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> 

不過,detectLinks只針對單個Javadoc報告而已,但不適用於Javadoc彙總報告。

如何爲集合的Javadoc報告啓用detectLinks?

回答

1

問題是聚合目標只檢查根項目的依賴關係,而不檢查模塊。剛剛創建的問題與補丁:http://jira.codehaus.org/browse/MJAVADOC-390

臨時解決方案可以在根項目申報你的依賴...但它是醜陋

- 瓦蘇爾

+0

一個新的修補程序添加到[MJAVADOC -390](http://jira.codehaus.org/browse/MJAVADOC-390),我想是因爲這個:[MSITE-171](http://jira.codehaus.org/browse/MSITE-171)。 – Vazul

+0

感謝您報告問題和修補程序。我錯過了賞金的最後期限,但我會開始新的賞金。 – Puce

+0

現在位於https://issues.apache.org/jira/browse/MJAVADOC-390 – vorburger