未验证 提交 e3900725 编写于 作者: J Jesse Glick

Cleaning up some more unusable Cobertura executions.

上级 9d43c3c9
......@@ -349,11 +349,6 @@ THE SOFTWARE.
<artifactId>ant-junit</artifactId>
<version>1.7.0</version>
</dependency>
<dependency>
<groupId>net.sourceforge.cobertura</groupId>
<artifactId>cobertura</artifactId>
<version>1.9</version>
</dependency>
<dependency>
<!-- this provided scope dependency doesn't get added to GMaven unless explicitly added here -->
<groupId>javax.servlet</groupId>
......@@ -516,10 +511,6 @@ THE SOFTWARE.
<artifactId>antlr-maven-plugin</artifactId>
<version>2.1</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
......
......@@ -321,35 +321,6 @@ THE SOFTWARE.
<surefire.rerunFailingTestsCount>4</surefire.rerunFailingTestsCount>
</properties>
</profile>
<profile>
<!-- Obtain code coverage report. This is done by running Unit tests on our own and suppressing surefire. -->
<id>cobertura</id>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.gmaven</groupId>
<artifactId>gmaven-plugin</artifactId>
<!-- version specified in grandparent pom -->
<executions>
<!-- run unit test -->
<execution>
<phase>test</phase>
<goals>
<goal>execute</goal>
</goals>
<configuration>
<scriptpath>
<!-- load helpers from hg core -->
<element>${project.basedir}/../core/src/build-script</element>
</scriptpath>
<source>${project.basedir}/src/build-script/unitTest.groovy</source>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>jacoco</id>
<build>
......
// run unit tests
import org.apache.commons.io.FileUtils
ant.project.setBaseDir(project.basedir)
// start from where the core left off, and build from there
ser=new File(project.basedir,"target/cobertura.ser");
FileUtils.copyFile(maven.resolveArtifact("${project.groupId}:hudson-core:${project.version}:cobertura:ser"),ser)
cob = new Cobertura(project,maven,ant,ser);
// instrumenting remote.jar causes all native m2 job to fail, because forked Maven doesn't have cobertura runtime
cob.instrument(["hudson-core"].collect{ m -> maven.resolveArtifact("${project.groupId}:${m}:${project.version}") })
cob.runTests()
cob.report(["../core/src/main/java"])
cob.makeBuildFailIfTestFail();
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册