You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by wa...@apache.org on 2018/04/10 03:47:55 UTC
[incubator-dubbo] branch master updated: Use jacoco instead of
cobertura for coverage rate collectiong (#1575)
This is an automated email from the ASF dual-hosted git repository.
wangxin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-dubbo.git
The following commit(s) were added to refs/heads/master by this push:
new c25d462 Use jacoco instead of cobertura for coverage rate collectiong (#1575)
c25d462 is described below
commit c25d462ff48c725440393da801e8c614df600248
Author: Huang YunKun <ht...@gmail.com>
AuthorDate: Tue Apr 10 11:47:50 2018 +0800
Use jacoco instead of cobertura for coverage rate collectiong (#1575)
---
.travis.yml | 2 +-
.../alibaba/dubbo/common/utils/ReflectUtils.java | 3 ++
pom.xml | 36 ++++++++++++++--------
3 files changed, 27 insertions(+), 14 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index 101cb29..e774ec5 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -2,12 +2,12 @@ language: java
sudo: false # faster builds
jdk:
+ - oraclejdk9
- oraclejdk8
- openjdk7
script:
- travis_wait 30 mvn clean package
- - travis_wait 30 mvn cobertura:cobertura
after_success:
- bash <(curl -s https://codecov.io/bash)
diff --git a/dubbo-common/src/main/java/com/alibaba/dubbo/common/utils/ReflectUtils.java b/dubbo-common/src/main/java/com/alibaba/dubbo/common/utils/ReflectUtils.java
index 88f4516..f9a8bba 100644
--- a/dubbo-common/src/main/java/com/alibaba/dubbo/common/utils/ReflectUtils.java
+++ b/dubbo-common/src/main/java/com/alibaba/dubbo/common/utils/ReflectUtils.java
@@ -910,6 +910,9 @@ public final class ReflectUtils {
while (cls != null && cls != Object.class) {
Field[] fields = cls.getDeclaredFields();
for (Field field : fields) {
+ if (field.isSynthetic()) {
+ continue;
+ }
Object property = getEmptyObject(field.getType(), emptyInstances, level + 1);
if (property != null) {
try {
diff --git a/pom.xml b/pom.xml
index 066f75a..f7bcfff 100644
--- a/pom.xml
+++ b/pom.xml
@@ -111,10 +111,10 @@
<maven_deploy_version>2.8.2</maven_deploy_version>
<maven_compiler_version>3.6.0</maven_compiler_version>
<maven_source_version>3.0.1</maven_source_version>
- <maven_cobertura_version>2.7</maven_cobertura_version>
<maven_javadoc_version>3.0.0</maven_javadoc_version>
<maven_jetty_version>6.1.26</maven_jetty_version>
<maven_checkstyle_version>3.0.0</maven_checkstyle_version>
+ <maven_jacoco_version>0.8.1</maven_jacoco_version>
</properties>
<modules>
@@ -184,7 +184,6 @@
<maven_deploy_version>2.7</maven_deploy_version>
<maven_compiler_version>3.1</maven_compiler_version>
<maven_source_version>3.0.1</maven_source_version>
- <maven_cobertura_version>2.7</maven_cobertura_version>
<maven_javadoc_version>2.10.1</maven_javadoc_version>
</properties>
</profile>
@@ -338,7 +337,7 @@
<configuration>
<useSystemClassLoader>true</useSystemClassLoader>
<forkMode>once</forkMode>
- <argLine>${argline}</argLine>
+ <argLine>${argline} ${jacocoArgLine}</argLine>
<systemProperties>
<!-- common shared -->
<property>
@@ -422,16 +421,27 @@
</configuration>
</plugin>
<plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>cobertura-maven-plugin</artifactId>
- <version>${maven_cobertura_version}</version>
- <configuration>
- <formats>
- <format>html</format>
- <format>xml</format>
- </formats>
- <check/>
- </configuration>
+ <groupId>org.jacoco</groupId>
+ <artifactId>jacoco-maven-plugin</artifactId>
+ <version>${maven_jacoco_version}</version>
+ <executions>
+ <execution>
+ <id>jacoco-initialize</id>
+ <goals>
+ <goal>prepare-agent</goal>
+ </goals>
+ <configuration>
+ <propertyName>jacocoArgLine</propertyName>
+ </configuration>
+ </execution>
+ <execution>
+ <id>jacoco-site</id>
+ <phase>package</phase>
+ <goals>
+ <goal>report</goal>
+ </goals>
+ </execution>
+ </executions>
</plugin>
</plugins>
--
To stop receiving notification emails like this one, please contact
wangxin@apache.org.