2011-03-14 85 views
1

配置reportPlugins與Maven 3,網站插件已經有關報告改變。的Maven 3,Maven的網站插件,如何在多模塊項目

在行家2中,報告部有一個「繼承」元件。例如:

<reporting> 
    <plugins> 
    <plugin> 
     <groupId>org.apache.maven.plugins</groupId> 
     <artifactId>maven-failsafe-plugin</artifactId> 
     <version>${failsafe.plugin.version}</version> 
     <configuration> 
     <useFile>false</useFile> 
     </configuration> 
     <inherited>true</inherited> 
     <reportSets> 
     <reportSet> 
      <reports> 
      <report>report-only</report> 
      </reports> 
     </reportSet> 
     </reportSets> 
    </plugin> 
    </plugins> 
</reporting> 

在Maven 3中是否存在報告插件繼承?所以在maven 3 reportPlugins的繼承行爲是什麼,是否有任何方法來改變這種行爲,如maven 2繼承元素?

第二個問題,部分在該網站的插件下reportPlugins上的插件配置中的任何影響?還是配置在pluginManagement & reportPlugins部分被複制?這些配置是否也必須在子模塊中複製?

當時我想這樣做在Maven的3以下的一天結束:

<!-- in parent pom --> 
<build> 
    <pluginManagement> 
    <plugin> 
     <groupId>org.apache.maven.plugins</groupId> 
     <artifactId>maven-failsafe-plugin</artifactId> 
     <version>${failsafe.plugin.version}</version> 
     <configuration> 
     <useFile>false</useFile> 
     </configuration> 
     <reportSets> 
     <reportSet> 
      <reports> 
      <report>report-only</report> 
      </reports> 
     </reportSet> 
     </reportSets> 
    </plugin> 
    </pluginManagement> 

    <plugins> 
    <plugin> 
     <groupId>org.apache.maven.plugins</groupId> 
     <artifactId>maven-failsafe-plugin</artifactId> 
     <!-- no version num or config - specified in pluginManagement section --> 
    </plugin> 

     <plugin> 
     <groupId>org.apache.maven.plugins</groupId> 
     <artifactId>maven-site-plugin</artifactId> 
     <configuration> 
      <reportPlugins> 
      <plugin> 
       <groupId>org.apache.maven.plugins</groupId> 
       <artifactId>maven-failsafe-plugin</artifactId> 
       <!-- no version num, config, or report set - specified in pluginManagement section --> 
      </plugin> 
      </reportPlugins> 
     </configuration> 
     </plugin> 
    </plugins> 
</build> 

<!-- in sub module pom --> 
<!-- specify nothing - already in parent pom--> 

而且我想所有這些配置被繼承到子模塊。即使是reportPlugins部分。

是任何/所有的這可能與行家3目前?

回答

2

看起來這可能不是完全可能的。請參閱maven站點插件中的this issue