Skip to content

Commit dac6d6a

Browse files
authored
Restore Jacoco code coverage (#2503)
1 parent aea864f commit dac6d6a

File tree

8 files changed

+41
-54
lines changed

8 files changed

+41
-54
lines changed

buildtime-reports/pom.xml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,17 @@
6060
</dependency>
6161
<dependency>
6262
<groupId>${project.groupId}</groupId>
63-
<artifactId>integration-tests</artifactId>
63+
<artifactId>json-schema</artifactId>
64+
<version>${project.version}</version>
65+
</dependency>
66+
<dependency>
67+
<groupId>${project.groupId}</groupId>
68+
<artifactId>operator-swagger</artifactId>
69+
<version>${project.version}</version>
70+
</dependency>
71+
<dependency>
72+
<groupId>${project.groupId}</groupId>
73+
<artifactId>installation-tests</artifactId>
6474
<version>${project.version}</version>
6575
</dependency>
6676
</dependencies>

integration-tests/pom.xml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,7 @@
7171
<artifactId>maven-failsafe-plugin</artifactId>
7272
<configuration>
7373
<encoding>UTF-8</encoding>
74-
<argLine>
75-
--add-opens java.base/java.time=ALL-UNNAMED
76-
</argLine>
74+
<argLine>@{argLine} --add-opens java.base/java.time=ALL-UNNAMED</argLine>
7775
<argLine>${failsafeArgLine}</argLine>
7876
<failIfNoTests>false</failIfNoTests>
7977
<includes>

json-schema-generator/pom.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,8 @@
4444
</dependency>
4545
</dependencies>
4646

47+
<properties>
48+
<sonar.coverage.jacoco.xmlReportPaths>${basedir}/../${aggregate.report.dir}</sonar.coverage.jacoco.xmlReportPaths>
49+
</properties>
50+
4751
</project>

kubernetes/pom.xml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,7 @@
119119
<include>**/*IT.java</include>
120120
<include>**/*AT.java</include>
121121
</includes>
122-
<argLine>
123-
--add-opens java.base/java.time=ALL-UNNAMED
124-
</argLine>
122+
<argLine>@{argLine} --add-opens java.base/java.time=ALL-UNNAMED</argLine>
125123
</configuration>
126124
<executions>
127125
<execution>
@@ -137,4 +135,8 @@
137135
</profile>
138136
</profiles>
139137

138+
<properties>
139+
<sonar.coverage.jacoco.xmlReportPaths>${basedir}/../${aggregate.report.dir}</sonar.coverage.jacoco.xmlReportPaths>
140+
</properties>
141+
140142
</project>

operator/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
<includes>
9393
<exclude>**/*Test.java</exclude>
9494
</includes>
95-
<argLine>--add-opens java.base/java.time=ALL-UNNAMED</argLine>
95+
<argLine>@{argLine} --add-opens java.base/java.time=ALL-UNNAMED</argLine>
9696
</configuration>
9797
</plugin>
9898

pom.xml

Lines changed: 14 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,20 @@
298298
</configuration>
299299
</plugin>
300300

301+
<plugin>
302+
<groupId>org.jacoco</groupId>
303+
<artifactId>jacoco-maven-plugin</artifactId>
304+
<version>${jacoco.version}</version>
305+
<executions>
306+
<execution>
307+
<id>prepare-agent</id>
308+
<goals>
309+
<goal>prepare-agent</goal>
310+
</goals>
311+
</execution>
312+
</executions>
313+
</plugin>
314+
301315
</plugins>
302316
</build>
303317

@@ -366,51 +380,6 @@
366380
</build>
367381
</profile>
368382

369-
<profile>
370-
<id>build-sonar</id>
371-
<build>
372-
<plugins>
373-
<plugin>
374-
<groupId>org.jacoco</groupId>
375-
<artifactId>jacoco-maven-plugin</artifactId>
376-
<executions>
377-
<execution>
378-
<id>prepare-agent</id>
379-
<goals>
380-
<goal>prepare-agent</goal>
381-
</goals>
382-
</execution>
383-
</executions>
384-
</plugin>
385-
</plugins>
386-
</build>
387-
</profile>
388-
389-
<profile>
390-
<id>jacoco</id>
391-
<activation>
392-
<property>
393-
<name>!no-reports</name>
394-
</property>
395-
</activation>
396-
<build>
397-
<plugins>
398-
<plugin>
399-
<groupId>org.jacoco</groupId>
400-
<artifactId>jacoco-maven-plugin</artifactId>
401-
<version>${jacoco.version}</version>
402-
<executions>
403-
<execution>
404-
<goals>
405-
<goal>prepare-agent</goal>
406-
</goals>
407-
</execution>
408-
</executions>
409-
</plugin>
410-
</plugins>
411-
</build>
412-
</profile>
413-
414383
<profile>
415384
<id>default</id>
416385
<activation>

sonar-project.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Required metadata
22
sonar.projectKey=weblogic-kubernetes-operator
33
sonar.projectName=WebLogic Kubernetes Operator
4-
sonar.projectVersion=2.2
4+
sonar.projectVersion=3.3.0
55
# Comma-separated paths to directories with sources (required)
66
sonar.sources=operator/src/main/java
77
sonar.java.source=11

swagger-generator/pom.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,4 +76,8 @@
7676
</dependency>
7777
</dependencies>
7878

79+
<properties>
80+
<sonar.coverage.jacoco.xmlReportPaths>${basedir}/../${aggregate.report.dir}</sonar.coverage.jacoco.xmlReportPaths>
81+
</properties>
82+
7983
</project>

0 commit comments

Comments
 (0)