Skip to content

Commit

Permalink
调整主pom的cobertura插件配置,让他能集成多模块的测试用例;
Browse files Browse the repository at this point in the history
这次提交也没有正确生成完整的代码覆盖率报告,好郁闷
  • Loading branch information
oldmanpushcart committed Nov 8, 2018
1 parent 5b8ccc6 commit 24259b0
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 11 deletions.
26 changes: 16 additions & 10 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>com.alibaba.jvm.sandbox</groupId>
Expand Down Expand Up @@ -67,6 +68,12 @@
</executions>
</plugin>

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<version>2.7</version>
</plugin>

<!-- 为了发布到MAVEN中央仓库而用的插件 -->
<plugin>
<groupId>org.sonatype.plugins</groupId>
Expand Down Expand Up @@ -96,17 +103,17 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<version>2.7</version>
<configuration>
<outputDirectory>./target/tmpCobertura</outputDirectory>
<aggregate>true</aggregate>
<check/>
<formats>
<format>html</format>
<format>xml</format>
</formats>
<aggregate>true</aggregate>
<check />
</configuration>
</plugin>

</plugins>
</build>

Expand All @@ -121,8 +128,8 @@
<module>sandbox-mgr-provider</module>
<module>sandbox-module-starter</module>
<module>sandbox-debug-module</module>
<module>sandbox-qatest</module>
</modules>
<module>sandbox-qatest</module>
</modules>

<dependencyManagement>
<dependencies>
Expand Down Expand Up @@ -164,7 +171,7 @@
<artifactId>javax.annotation-api</artifactId>
<version>1.2</version>
</dependency>

<dependency>
<groupId>org.kohsuke.metainf-services</groupId>
<artifactId>metainf-services</artifactId>
Expand All @@ -188,8 +195,8 @@
</repository>
</distributionManagement>

<description>Alibaba jvm-sandbox OpenSource Project</description>
<url>https://github.com/alibaba/jvm-Sandbox</url>
<description>Alibaba JVM-SANDBOX OpenSource Project</description>
<url>https://github.com/alibaba/jvm-sandbox</url>

<licenses>
<license>
Expand Down Expand Up @@ -222,5 +229,4 @@
<url>https://github.com/alibaba/jvm-sandbox</url>
</scm>


</project>
15 changes: 15 additions & 0 deletions sandbox-debug-module/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,21 @@
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<configuration>
<skip>true</skip>
<check/>
</configuration>
<executions>
<execution>
<goals>
<goal>cobertura</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

Expand Down
15 changes: 15 additions & 0 deletions sandbox-module-starter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,21 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<configuration>
<skip>true</skip>
<check/>
</configuration>
<executions>
<execution>
<goals>
<goal>cobertura</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

Expand Down
17 changes: 16 additions & 1 deletion sandbox-qatest/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,25 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<forkMode>pertest</forkMode>
<forkMode>once</forkMode>
<argLine>-Xbootclasspath/p:./lib/sandbox-spy-1.1.0-for-qatest.jar</argLine>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<configuration>
<skip>true</skip>
<check/>
</configuration>
<executions>
<execution>
<goals>
<goal>cobertura</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

Expand Down

0 comments on commit 24259b0

Please sign in to comment.