我已经有一些项目已经通过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