2012-01-08 4 views
1

私はマルチモジュールプロジェクトを持っています。私はウェブサイトのための集約されたcoberturaレポートを生成したいと思います。 Coberturaのが唯一の空のtarget/site/cobertura/index.htmlファイルを生成cobertura on pom-packaging module

... 
<reportPlugins> 
    <plugin> 
    <groupId>org.codehaus.mojo</groupId> 
    <artifactId>cobertura-maven-plugin</artifactId> 
    <version>2.5.1</version> 
    <configuration> 
     <aggregate>true</aggregate> 
    </configuration> 
    </plugin> 
</reportPlugins> 
... 

:上mvn siteを実行するモジュールIMは、サイト

[INFO] >>> cobertura-maven-plugin:2.5.1:cobertura (report:cobertura) @ parent >>> 
[INFO] 
[INFO] --- cobertura-maven-plugin:2.5.1:instrument (report:cobertura) @ parent --- 
[INFO] Skipping cobertura mojo for project with packaging type 'pom' 
[INFO] 
[INFO] <<< cobertura-maven-plugin:2.5.1:cobertura (report:cobertura) @ parent <<< 
[INFO] Not executing cobertura:report as the cobertura data file (/home/user/parent/target/cobertura/cobertura.ser) could not be found 

に関連ポンポン部分を生成するときにMavenは私にこれを与えるので、POM包装です。コベルトウラを「強制的に」動かす方法はありますか?集計されたレポートを取得する別の方法ですか?あなたの構成セクションの使用では

+0

forceMoojoExecutionが動作するようには思えません。これには解決策がありますか? – jcampos8782

答えて

1

:レポート生成で

<forceMojoExecution>true</forceMojoExecution> 
1

は、我々は以下のように、出力形式のHTMLを有効にする必要があります、

<reporting> 
    <plugins> 
.... 
    <plugin> 
     <groupId>org.codehaus.mojo</groupId> 
     <artifactId>cobertura-maven-plugin</artifactId> 
     <version>2.6</version> 
     <configuration> 
      <formats> 
       <format>html</format> 
       <format>xml</format> 
      </formats> 
     </configuration> 
    </plugin> 

     </plugins> 
    </reporting> 
関連する問題