forked from phoedos/pmd
Fix coveralls integration
This commit is contained in:
parent
7069e6146c
commit
ce347bd736
27
.ci/build.sh
27
.ci/build.sh
@ -136,13 +136,9 @@ function build() {
|
||||
pmd_ci_openjdk_setdefault 17
|
||||
# Note: Sonar also needs GITHUB_TOKEN (!)
|
||||
./mvnw \
|
||||
-Dmaven.javadoc.skip=true \
|
||||
-Dmaven.source.skip \
|
||||
-Dcheckstyle.skip \
|
||||
-Dpmd.skip \
|
||||
--show-version --errors --batch-mode \
|
||||
clean package \
|
||||
sonar:sonar -Dsonar.login="${SONAR_TOKEN}" -Psonar
|
||||
sonar:sonar -Dsonar.login="${SONAR_TOKEN}" -Psonar,fastSkip
|
||||
pmd_ci_log_success "New sonar results: https://sonarcloud.io/dashboard?id=net.sourceforge.pmd%3Apmd"
|
||||
pmd_ci_log_group_end
|
||||
|
||||
@ -151,15 +147,22 @@ function build() {
|
||||
export CI_NAME="github actions"
|
||||
export CI_BUILD_URL="${PMD_CI_JOB_URL}"
|
||||
export CI_BRANCH="${PMD_CI_BRANCH}"
|
||||
# first create jacoco report
|
||||
./mvnw \
|
||||
-Dmaven.javadoc.skip=true \
|
||||
-Dmaven.source.skip \
|
||||
-Dcheckstyle.skip \
|
||||
-Dpmd.skip \
|
||||
-DrepoToken="${COVERALLS_REPO_TOKEN}" \
|
||||
--show-version --errors --batch-mode \
|
||||
clean package jacoco:report \
|
||||
coveralls:report -Pcoveralls
|
||||
clean package \
|
||||
jacoco:report -Pcoveralls,fastSkip
|
||||
|
||||
# workaround, maybe https://github.com/jacoco/jacoco/issues/654
|
||||
sed -i 's$Comparisons.kt$ApexTreeBuilder.kt$g' pmd-apex/target/site/jacoco/jacoco.xml
|
||||
|
||||
# then create and send coveralls report
|
||||
# note: generate-sources is needed, so that antlr4 generated directories are on the compileSourceRoots
|
||||
./mvnw \
|
||||
--show-version --errors --batch-mode \
|
||||
generate-sources \
|
||||
coveralls:report -DrepoToken="${COVERALLS_REPO_TOKEN}" -Pcoveralls,fastSkip
|
||||
|
||||
pmd_ci_log_success "New coveralls result: https://coveralls.io/github/pmd/pmd"
|
||||
pmd_ci_log_group_end
|
||||
fi
|
||||
|
34
pom.xml
34
pom.xml
@ -550,7 +550,7 @@
|
||||
<plugin>
|
||||
<groupId>org.jacoco</groupId>
|
||||
<artifactId>jacoco-maven-plugin</artifactId>
|
||||
<version>0.8.8</version>
|
||||
<version>0.8.11</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.cyclonedx</groupId>
|
||||
@ -1142,6 +1142,23 @@
|
||||
</profile>
|
||||
|
||||
<profile>
|
||||
<!-- skips many plugins. Useful for sonar and coveralls and reproducible builds -->
|
||||
<id>fastSkip</id>
|
||||
<properties>
|
||||
<maven.javadoc.skip>true</maven.javadoc.skip>
|
||||
<maven.source.skip>true</maven.source.skip>
|
||||
<checkstyle.skip>true</checkstyle.skip>
|
||||
<pmd.skip>true</pmd.skip>
|
||||
<cpd.skip>true</cpd.skip>
|
||||
<cyclonedx.skip>true</cyclonedx.skip>
|
||||
<dokka.skip>true</dokka.skip>
|
||||
</properties>
|
||||
</profile>
|
||||
|
||||
<profile>
|
||||
<!--
|
||||
Configuration: https://docs.coveralls.io/java | https://github.com/hazendaz/coveralls-maven-plugin
|
||||
Report is available here: https://coveralls.io/github/pmd/pmd -->
|
||||
<id>coveralls</id>
|
||||
<build>
|
||||
<plugins>
|
||||
@ -1158,20 +1175,9 @@
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.eluder.coveralls</groupId>
|
||||
<groupId>com.github.hazendaz.maven</groupId>
|
||||
<artifactId>coveralls-maven-plugin</artifactId>
|
||||
<version>4.3.0</version>
|
||||
<dependencies>
|
||||
<!--
|
||||
coveralls maven plugin needs javax.xml.bind api
|
||||
See also https://github.com/trautonen/coveralls-maven-plugin/issues/112
|
||||
-->
|
||||
<dependency>
|
||||
<groupId>javax.xml.bind</groupId>
|
||||
<artifactId>jaxb-api</artifactId>
|
||||
<version>2.3.0</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<version>4.5.0-M3</version>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
Loading…
x
Reference in New Issue
Block a user