Maven 3.0 ではsiteの設定方法が変わっている。
カバレッジを取得、表示するためのcoberturaの設定。2.0 まではreportingに設定していましたが、3.0からはmaven-site-pluginのconfigurationで設定します。ローカルはmaven3、だけどJenkinsはmaven2を使っているので、両方で動くようにmaven3用のプロファイルを作成しました。
<profile> <id>maven-3</id> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-site-plugin</artifactId> <version>3.0-beta-2</version> <configuration> <reportPlugins> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>cobertura-maven-plugin</artifactId> <version>2.4</version> <configuration> <instrumentation> <excludes> <exclude>com/hoge/**/*Test.class</exclude> </excludes> </instrumentation> </configuration> </plugin> </reportPlugins> </configuration> </plugin> </plugins> </build> </profile>
javadocなど、reportingに設定していたプラグインは、すべてconfiguration以下に移動する必要あり。でも、一部maven3に対応していないreportingプラグインもあるので注意が必要。maven 3.0はmaven 2.0と完全互換、って書いてあったのになあ。英語読み間違えたかな。
https://cwiki.apache.org/MAVEN/maven-3x-and-site-plugin.html