Skip to content

Commit

Permalink
Add jacoco maven plugin for code coverage. (sofastack#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
ujjboy authored Apr 11, 2018
1 parent ffe0cc9 commit 4547f63
Show file tree
Hide file tree
Showing 17 changed files with 286 additions and 40 deletions.
4 changes: 2 additions & 2 deletions all/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
</developers>

<scm>
<connection>scm:git:git://github.com:alipay/sofa-rpc.git</connection>
<developerConnection>scm:git:ssh://github.com:alipay/sofa-rpc.git</developerConnection>
<connection>scm:git:git://github.com/alipay/sofa-rpc.git</connection>
<developerConnection>scm:git:ssh://github.com/alipay/sofa-rpc.git</developerConnection>
<url>http://github.com/alipay/sofa-rpc/tree/master</url>
</scm>

Expand Down
1 change: 0 additions & 1 deletion core-impl/client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
<dependency>
<groupId>com.alipay.sofa</groupId>
<artifactId>sofa-rpc-api</artifactId>
<version>${project.parent.version}</version>
</dependency>

<dependency>
Expand Down
2 changes: 1 addition & 1 deletion core-impl/codec/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
<dependency>
<groupId>com.alipay.sofa</groupId>
<artifactId>sofa-rpc-api</artifactId>
<version>${project.parent.version}</version>
</dependency>

<dependency>
<groupId>com.alipay.sofa</groupId>
<artifactId>sofa-rpc-log</artifactId>
<version>${project.parent.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
Expand Down
1 change: 0 additions & 1 deletion core-impl/filter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
<dependency>
<groupId>com.alipay.sofa</groupId>
<artifactId>sofa-rpc-api</artifactId>
<version>${project.parent.version}</version>
</dependency>

<dependency>
Expand Down
1 change: 0 additions & 1 deletion core-impl/log/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
<dependency>
<groupId>com.alipay.sofa</groupId>
<artifactId>sofa-rpc-api</artifactId>
<version>${project.parent.version}</version>
</dependency>

<dependency>
Expand Down
1 change: 0 additions & 1 deletion core-impl/proxy/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
<dependency>
<groupId>com.alipay.sofa</groupId>
<artifactId>sofa-rpc-api</artifactId>
<version>${project.parent.version}</version>
</dependency>

<dependency>
Expand Down
1 change: 0 additions & 1 deletion extension-impl/bootstrap-bolt/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
<dependency>
<groupId>com.alipay.sofa</groupId>
<artifactId>sofa-rpc-api</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>com.alipay.sofa</groupId>
Expand Down
51 changes: 49 additions & 2 deletions extension-impl/bootstrap-rest/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,64 @@

<artifactId>sofa-rpc-bootstrap-rest</artifactId>


<dependencies>
<dependency>
<groupId>com.alipay.sofa</groupId>
<artifactId>sofa-rpc-api</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>com.alipay.sofa</groupId>
<artifactId>sofa-rpc-extension-common</artifactId>
<version>${project.parent.version}</version>
</dependency>
</dependencies>

<build>
<sourceDirectory>src/main/java</sourceDirectory>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>false</filtering>
<includes>
<include>**/**</include>
</includes>
</resource>
</resources>
<testSourceDirectory>src/test/java</testSourceDirectory>
<testResources>
<testResource>
<directory>src/test/resources</directory>
<filtering>false</filtering>
<includes>
<include>**/**</include>
</includes>
</testResource>
</testResources>

<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
<encoding>${project.build.sourceEncoding}</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
</project>
9 changes: 0 additions & 9 deletions extension-impl/extension-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,48 +16,39 @@
<dependency>
<groupId>com.alipay.sofa</groupId>
<artifactId>sofa-rpc-common</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>com.alipay.sofa</groupId>
<artifactId>sofa-rpc-exception</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>com.alipay.sofa</groupId>
<artifactId>sofa-rpc-api</artifactId>
<version>${project.parent.version}</version>
</dependency>

<dependency>
<groupId>com.alipay.sofa</groupId>
<artifactId>sofa-rpc-client</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>com.alipay.sofa</groupId>
<artifactId>sofa-rpc-codec</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>com.alipay.sofa</groupId>
<artifactId>sofa-rpc-filter</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>com.alipay.sofa</groupId>
<artifactId>sofa-rpc-log</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>com.alipay.sofa</groupId>
<artifactId>sofa-rpc-proxy</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>com.alipay.sofa</groupId>
<artifactId>sofa-rpc-transport</artifactId>
<version>${project.parent.version}</version>
</dependency>

<dependency>
Expand Down
1 change: 0 additions & 1 deletion extension-impl/log-common-tools/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
<dependency>
<groupId>com.alipay.sofa</groupId>
<artifactId>sofa-rpc-api</artifactId>
<version>${project.parent.version}</version>
</dependency>

<dependency>
Expand Down
51 changes: 51 additions & 0 deletions extension-impl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,57 @@
<module>transmit-ip</module>
</modules>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.alipay.sofa</groupId>
<artifactId>sofa-rpc-exception</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>com.alipay.sofa</groupId>
<artifactId>sofa-rpc-common</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>com.alipay.sofa</groupId>
<artifactId>sofa-rpc-api</artifactId>
<version>${project.parent.version}</version>
</dependency>

<dependency>
<groupId>com.alipay.sofa</groupId>
<artifactId>sofa-rpc-client</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>com.alipay.sofa</groupId>
<artifactId>sofa-rpc-codec</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>com.alipay.sofa</groupId>
<artifactId>sofa-rpc-filter</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>com.alipay.sofa</groupId>
<artifactId>sofa-rpc-log</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>com.alipay.sofa</groupId>
<artifactId>sofa-rpc-proxy</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>com.alipay.sofa</groupId>
<artifactId>sofa-rpc-transport</artifactId>
<version>${project.parent.version}</version>
</dependency>
</dependencies>
</dependencyManagement>

<build>
<plugins>
<plugin>
Expand Down
1 change: 0 additions & 1 deletion extension-impl/transmit-ip/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
<dependency>
<groupId>com.alipay.sofa</groupId>
<artifactId>sofa-rpc-api</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>com.alipay.sofa</groupId>
Expand Down
24 changes: 24 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,11 @@
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.4</version>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.7.9</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
Expand Down Expand Up @@ -212,6 +217,25 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<executions>
<execution>
<id>default-prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>default-report</id>
<phase>test</phase>
<goals>
<goal>report-aggregate</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

Expand Down
10 changes: 0 additions & 10 deletions test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,6 @@
<module>test-integration-3rd</module>
</modules>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.alipay.sofa</groupId>
<artifactId>sofa-rpc-all</artifactId>
<version>${project.parent.version}</version>
</dependency>
</dependencies>
</dependencyManagement>

<build>
<plugins>
<plugin>
Expand Down
1 change: 0 additions & 1 deletion test/test-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
<groupId>com.alipay.sofa</groupId>
<artifactId>sofa-rpc-api</artifactId>
<version>${project.parent.version}</version>
<scope>provided</scope>
</dependency>

<dependency>
Expand Down
35 changes: 31 additions & 4 deletions test/test-integration-3rd/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,42 @@
<dependencies>
<dependency>
<groupId>com.alipay.sofa</groupId>
<artifactId>sofa-rpc-all</artifactId>
<scope>test</scope>
<artifactId>sofa-rpc-test-common</artifactId>
<version>${project.parent.version}</version>
</dependency>

<dependency>
<groupId>com.alipay.sofa</groupId>
<artifactId>sofa-rpc-test-common</artifactId>
<artifactId>sofa-rpc-test-integration</artifactId>
<version>${project.parent.version}</version>
</dependency>

<dependency>
<groupId>com.alipay.sofa</groupId>
<artifactId>sofa-rpc-bootstrap-dubbo</artifactId>
<version>${project.parent.version}</version>
<exclusions>
<exclusion>
<groupId>com.alibaba</groupId>
<artifactId>dubbo</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.alipay.sofa</groupId>
<artifactId>sofa-rpc-registry-zk</artifactId>
<version>${project.parent.version}</version>
<exclusions>
<exclusion>
<groupId>org.apache.curator</groupId>
<artifactId>curator-recipes</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.alipay.sofa</groupId>
<artifactId>sofa-rpc-transmit-ip</artifactId>
<version>${project.parent.version}</version>
<scope>test</scope>
</dependency>

<dependency>
Expand Down
Loading

0 comments on commit 4547f63

Please sign in to comment.