我已經有一些項目已經通過maven做網站生成,並且我想將cobertura報告集成到它們中,但是我似乎沒有運行的maven目標會生成本地預覽我看看,包括網站上的Cobertura報告。我想確保它們在我將pom更改到repo並破壞網站生成之前正確生成。生成包括Cobertura報告的maven站點
下面是我已經添加到maven的POMS(父母模塊),但我看到的網站,當我運行mvn site:run
不包括的Cobertura報告:
<project>
...
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<configuration>
<check>
<haltOnFailure>false</haltOnFailure>
<regexes>
<regex>
<pattern>parent-package-name-here.*</pattern>
<branchRate>80</branchRate>
<lineRate>80</lineRate>
</regex>
</regexes>
</check>
<instrumentation>
<includes>
<include>parent-package-name-here/**/*.class</include>
</includes>
</instrumentation>
</configuration>
<executions>
<execution>
<id>clean</id>
<phase>pre-site</phase>
<goals>
<goal>clean</goal>
</goals>
</execution>
<execution>
<id>instrument</id>
<phase>site</phase>
<goals>
<goal>instrument</goal>
<goal>cobertura</goal>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
...
<reporting>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
</plugin>
</plugins>
</reporting>
...
</project>
什麼Maven的命令,我應該使用用cobertura報告生成該網站?或者,我應該添加什麼(另外)讓網站生成包含cobertura報告?
您應該將此文件作爲maven錯誤跟蹤器中的錯誤,否則將無法使用。 – 2009-03-12 13:28:32