File tree Expand file tree Collapse file tree 6 files changed +107
-49
lines changed
Expand file tree Collapse file tree 6 files changed +107
-49
lines changed Original file line number Diff line number Diff line change 1+ service_name : AppVeyor
Original file line number Diff line number Diff line change 99
1010version : ' {build}'
1111image :
12- - Visual Studio 2017
1312 - Ubuntu2004
13+ - Visual Studio 2017
1414build : false
1515clone_depth : 50
1616branches :
@@ -22,6 +22,27 @@ environment:
2222 APPVEYOR_YML_DISABLE_PS_LINUX : true
2323
2424for :
25+ -
26+ # ------------------
27+ # Ubuntu
28+ # ------------------
29+ matrix :
30+ only :
31+ - image : Ubuntu2004
32+ init :
33+ - sh : export MAVEN_OPTS="-Xmx768m -XX:MaxPermSize=128m -Dhttps.protocols=TLSv1,TLSv1.1,TLSv1.2"
34+ - sh : export JAVA_OPTS="-Xmx768m -XX:MaxPermSize=128m"
35+
36+ test_script :
37+ - sh : ./scripts/integration-test.sh
38+
39+ after_test :
40+ - sh : ./scripts/codecov.sh
41+ - sh : rm -rf /home/appveyor/.m2/repository/com/alibaba/dns-cache-manipulator*
42+
43+ cache :
44+ - /home/appveyor/.m2/
45+ - /home/appveyor/.sdkman/
2546 -
2647 # ------------------
2748 # Windows
5172
5273 cache :
5374 - C:\Users\appveyor\.m2\
54- -
55- # ------------------
56- # Ubuntu
57- # ------------------
58- matrix :
59- only :
60- - image : Ubuntu2004
61- init :
62- - sh : export MAVEN_OPTS="-Xmx768m -XX:MaxPermSize=128m -Dhttps.protocols=TLSv1,TLSv1.1,TLSv1.2"
63- - sh : export JAVA_OPTS="-Xmx768m -XX:MaxPermSize=128m"
64-
65- test_script :
66- - sh : ./scripts/integration-test.sh
67-
68- after_test :
69- - sh : rm -rf /home/appveyor/.m2/repository/com/alibaba/dns-cache-manipulator*
70-
71- cache :
72- - /home/appveyor/.m2/
73- - /home/appveyor/.sdkman/
Original file line number Diff line number Diff line change 391391 </profile >
392392 <profile >
393393 <id >gen-code-cov</id >
394- <activation >
395- <property >
396- <name >env.TRAVIS</name >
397- <value >true</value >
398- </property >
399- </activation >
400394 <build >
401395 <plugins >
396+ <plugin >
397+ <groupId >org.eluder.coveralls</groupId >
398+ <artifactId >coveralls-maven-plugin</artifactId >
399+ <version >4.3.0</version >
400+ <configuration >
401+ <repoToken >${env.COVERALLS_REPO_TOKEN} </repoToken >
402+ </configuration >
403+ <!-- https://github.com/trautonen/coveralls-maven-plugin/issues/112 -->
404+ <dependencies >
405+ <dependency >
406+ <groupId >javax.xml.bind</groupId >
407+ <artifactId >jaxb-api</artifactId >
408+ <version >2.2.3</version >
409+ </dependency >
410+ </dependencies >
411+ </plugin >
402412 <plugin >
403413 <!-- for codecov.io -->
404414 <!-- config example: https://github.com/codecov/example-java -->
411421 <goals >
412422 <goal >prepare-agent</goal >
413423 </goals >
424+ <!--
425+ https://www.eclemma.org/jacoco/trunk/doc/prepare-agent-mojo.html
426+ -->
427+ <configuration >
428+ <append >true</append >
429+ </configuration >
414430 </execution >
415431 <execution >
416432 <id >report</id >
417433 <phase >test</phase >
418434 <goals >
419435 <goal >report</goal >
420436 </goals >
421- <configuration >
422- <excludes >
423- <exclude >com/alibaba/dcm/internal/JavaVersion.class</exclude >
424- </excludes >
425- </configuration >
426437 </execution >
427438 </executions >
439+ <configuration >
440+ <!--
441+ Maven Jacoco Configuration - Exclude classes/packages from report not working - Stack Overflow
442+ https://stackoverflow.com/questions/27799419
443+ -->
444+ <excludes >
445+ <exclude >com/alibaba/dcm/internal/JavaVersion.class</exclude >
446+ </excludes >
447+ </configuration >
428448 </plugin >
429449 </plugins >
430450 </build >
Original file line number Diff line number Diff line change 121121 <profiles >
122122 <profile >
123123 <id >gen-code-cov</id >
124- <activation >
125- <property >
126- <name >env.TRAVIS</name >
127- <value >true</value >
128- </property >
129- </activation >
130124 <build >
131125 <plugins >
126+ <plugin >
127+ <groupId >org.eluder.coveralls</groupId >
128+ <artifactId >coveralls-maven-plugin</artifactId >
129+ <version >4.3.0</version >
130+ <configuration >
131+ <repoToken >${env.COVERALLS_REPO_TOKEN} </repoToken >
132+ </configuration >
133+ <!-- https://github.com/trautonen/coveralls-maven-plugin/issues/112 -->
134+ <dependencies >
135+ <dependency >
136+ <groupId >javax.xml.bind</groupId >
137+ <artifactId >jaxb-api</artifactId >
138+ <version >2.2.3</version >
139+ </dependency >
140+ </dependencies >
141+ </plugin >
132142 <plugin >
133143 <!-- for codecov.io -->
134144 <!-- config example: https://github.com/codecov/example-java -->
Original file line number Diff line number Diff line change 22set -eEuo pipefail
33cd " $( dirname " $( readlink -f " $0 " ) " ) "
44
5- source ./common_build.sh skipClean
5+ source ./common_build.sh
66source ./prepare-jdk.sh
77
8- switch_to_jdk 8
9-
108cd " $ROOT_PROJECT_DIR "
11- runCmd ./mvnw -Pgen-code-cov clean package cobertura:cobertura coveralls:report
9+
10+ switch_to_jdk 11
11+ runCmd " ${MVN_CMD[@]} " -Pgen-code-cov clean test jacoco:report
12+
13+ switch_to_jdk 8
14+ # use -Dmaven.main.skip option fix below problem of jacoco-maven-plugin:report :
15+ #
16+ # [WARNING] Classes in bundle 'Java Dns Cache Manipulator(DCM) Lib' do not match with execution data.
17+ # For report generation the same class files must be used as at runtime.
18+ # [WARNING] Execution data for class com/alibaba/xxx/Yyy does not match.
19+ runCmd " ${MVN_CMD[@]} " -Pgen-code-cov -Dmaven.main.skip test jacoco:report coveralls:report
Original file line number Diff line number Diff line change 411411 </validationProperty >
412412 </validationProperties >
413413 <generateGitPropertiesFile >true</generateGitPropertiesFile >
414- <generateGitPropertiesFilename >${project.build.outputDirectory} /META-INF/scm/${project.groupId} /${project.artifactId} /git.properties</generateGitPropertiesFilename >
414+ <generateGitPropertiesFilename >
415+ ${project.build.outputDirectory} /META-INF/scm/${project.groupId} /${project.artifactId} /git.properties
416+ </generateGitPropertiesFilename >
415417 </configuration >
416418 </plugin >
417419 </plugins >
453455 </profile >
454456 <profile >
455457 <id >gen-code-cov</id >
456- <activation >
457- <property >
458- <name >env.TRAVIS</name >
459- <value >true</value >
460- </property >
461- </activation >
462458 <build >
463459 <plugins >
460+ <plugin >
461+ <groupId >org.eluder.coveralls</groupId >
462+ <artifactId >coveralls-maven-plugin</artifactId >
463+ <version >4.3.0</version >
464+ <configuration >
465+ <repoToken >${env.COVERALLS_REPO_TOKEN} </repoToken >
466+ </configuration >
467+ <!-- https://github.com/trautonen/coveralls-maven-plugin/issues/112 -->
468+ <dependencies >
469+ <dependency >
470+ <groupId >javax.xml.bind</groupId >
471+ <artifactId >jaxb-api</artifactId >
472+ <version >2.2.3</version >
473+ </dependency >
474+ </dependencies >
475+ </plugin >
464476 <plugin >
465477 <!-- for codecov.io -->
466478 <!-- config example: https://github.com/codecov/example-java -->
473485 <goals >
474486 <goal >prepare-agent</goal >
475487 </goals >
488+ <!--
489+ https://www.eclemma.org/jacoco/trunk/doc/prepare-agent-mojo.html
490+ -->
491+ <configuration >
492+ <append >true</append >
493+ </configuration >
476494 </execution >
477495 <execution >
478496 <id >report</id >
You can’t perform that action at this time.
0 commit comments