Skip to content

Commit f31b3ef

Browse files
switching to non-aggregate jacoco reporting (#2928)
1 parent 160fab9 commit f31b3ef

File tree

8 files changed

+27
-110
lines changed

8 files changed

+27
-110
lines changed

Jenkinsfile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -342,8 +342,6 @@ pipeline {
342342
cat "${WORKSPACE}/.mvn/maven.config"
343343
'''
344344
withSonarQubeEnv('SonarCloud') {
345-
// For whatever reason, defining this property in the maven.config file is not working...
346-
//
347345
sh "mvn sonar:sonar"
348346
}
349347
}

buildtime-reports/pom.xml

Lines changed: 0 additions & 78 deletions
This file was deleted.

json-schema-generator/pom.xml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- Copyright (c) 2017, 2021, Oracle and/or its affiliates.
1+
<!-- Copyright (c) 2017, 2022, Oracle and/or its affiliates.
22
Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. -->
33
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
44
xmlns="http://maven.apache.org/POM/4.0.0"
@@ -22,6 +22,10 @@
2222
<groupId>org.apache.maven.plugins</groupId>
2323
<artifactId>maven-checkstyle-plugin</artifactId>
2424
</plugin>
25+
<plugin>
26+
<groupId>org.jacoco</groupId>
27+
<artifactId>jacoco-maven-plugin</artifactId>
28+
</plugin>
2529
</plugins>
2630
</build>
2731

@@ -43,9 +47,4 @@
4347
<scope>test</scope>
4448
</dependency>
4549
</dependencies>
46-
47-
<properties>
48-
<sonar.coverage.jacoco.xmlReportPaths>${basedir}/../${aggregate.report.dir}</sonar.coverage.jacoco.xmlReportPaths>
49-
</properties>
50-
5150
</project>

kubernetes/pom.xml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- Copyright (c) 2017, 2021, Oracle and/or its affiliates.
1+
<!-- Copyright (c) 2017, 2022, Oracle and/or its affiliates.
22
Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
33
-->
44
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@@ -134,9 +134,4 @@
134134
</build>
135135
</profile>
136136
</profiles>
137-
138-
<properties>
139-
<sonar.coverage.jacoco.xmlReportPaths>${basedir}/../${aggregate.report.dir}</sonar.coverage.jacoco.xmlReportPaths>
140-
</properties>
141-
142137
</project>

operator-build-maven-plugin/pom.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,10 @@
7676
<groupId>org.apache.maven.plugins</groupId>
7777
<artifactId>maven-checkstyle-plugin</artifactId>
7878
</plugin>
79+
<plugin>
80+
<groupId>org.jacoco</groupId>
81+
<artifactId>jacoco-maven-plugin</artifactId>
82+
</plugin>
7983
</plugins>
8084
</build>
8185
</project>

operator/pom.xml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- Copyright (c) 2017, 2021, Oracle and/or its affiliates.
1+
<!-- Copyright (c) 2017, 2022, Oracle and/or its affiliates.
22
Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. -->
33
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
44
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
@@ -271,7 +271,10 @@
271271
</execution>
272272
</executions>
273273
</plugin>
274-
274+
<plugin>
275+
<groupId>org.jacoco</groupId>
276+
<artifactId>jacoco-maven-plugin</artifactId>
277+
</plugin>
275278
</plugins>
276279
</build>
277280

@@ -405,9 +408,4 @@
405408
<scope>test</scope>
406409
</dependency>
407410
</dependencies>
408-
409-
<properties>
410-
<sonar.coverage.jacoco.xmlReportPaths>${basedir}/../${aggregate.report.dir}</sonar.coverage.jacoco.xmlReportPaths>
411-
</properties>
412-
413411
</project>

pom.xml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
<module>kubernetes</module>
1717
<module>operator-build-maven-plugin</module>
1818
<module>json-schema-generator</module>
19-
<module>buildtime-reports</module>
2019
</modules>
2120

2221
<scm>
@@ -309,9 +308,15 @@
309308
<goal>prepare-agent</goal>
310309
</goals>
311310
</execution>
311+
<execution>
312+
<id>report</id>
313+
<phase>test</phase>
314+
<goals>
315+
<goal>report</goal>
316+
</goals>
317+
</execution>
312318
</executions>
313319
</plugin>
314-
315320
</plugins>
316321
</build>
317322

@@ -627,9 +632,7 @@
627632
<jacoco.version>0.8.7</jacoco.version>
628633
<git-commit-id-plugin-version>4.9.10</git-commit-id-plugin-version>
629634
<htmlunit-version>2.59.0</htmlunit-version>
630-
<aggregate.report.dir>buildtime-reports/target/site/jacoco-aggregate/jacoco.xml</aggregate.report.dir>
631635
<checkstyle.config.location>${root.basedir}/build-tools/checkstyle/customized_google_checks.xml</checkstyle.config.location>
632636
<no-reports>false</no-reports>
633637
</properties>
634-
635638
</project>

swagger-generator/pom.xml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- Copyright (c) 2017, 2021, Oracle and/or its affiliates.
1+
<!-- Copyright (c) 2017, 2022, Oracle and/or its affiliates.
22
Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. -->
33
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
44
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
@@ -52,11 +52,14 @@
5252
<groupId>org.apache.maven.plugins</groupId>
5353
<artifactId>maven-checkstyle-plugin</artifactId>
5454
</plugin>
55+
<plugin>
56+
<groupId>org.jacoco</groupId>
57+
<artifactId>jacoco-maven-plugin</artifactId>
58+
</plugin>
5559
</plugins>
5660
</build>
5761

5862
<profiles>
59-
6063
<profile>
6164
<id>default</id>
6265
<activation>
@@ -75,9 +78,4 @@
7578
<artifactId>client-java</artifactId>
7679
</dependency>
7780
</dependencies>
78-
79-
<properties>
80-
<sonar.coverage.jacoco.xmlReportPaths>${basedir}/../${aggregate.report.dir}</sonar.coverage.jacoco.xmlReportPaths>
81-
</properties>
82-
8381
</project>

0 commit comments

Comments
 (0)