Skip to content

Commit 40f7d64

Browse files
committed
JCR-5160 Generate Jacoco Report in default location to be picked up by
SonarScanner for Maven The same agent is used for both ITs/UTs, one aggregate report is being used. Do no longer skip test execution for profile "javadoc" and "rat".
1 parent 49ccae2 commit 40f7d64

1 file changed

Lines changed: 5 additions & 19 deletions

File tree

jackrabbit-parent/pom.xml

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -110,12 +110,6 @@
110110
</execution>
111111
</executions>
112112
</plugin>
113-
<plugin>
114-
<artifactId>maven-surefire-plugin</artifactId>
115-
<configuration>
116-
<skipTests>true</skipTests>
117-
</configuration>
118-
</plugin>
119113
</plugins>
120114
</build>
121115
</profile>
@@ -135,12 +129,6 @@
135129
</execution>
136130
</executions>
137131
</plugin>
138-
<plugin>
139-
<artifactId>maven-surefire-plugin</artifactId>
140-
<configuration>
141-
<skipTests>true</skipTests>
142-
</configuration>
143-
</plugin>
144132
</plugins>
145133
</build>
146134
</profile>
@@ -263,26 +251,25 @@
263251
<version>0.8.13</version>
264252
<executions>
265253
<execution>
266-
<id>pre-unit-test</id>
254+
<id>prepare-jacoco-agent</id>
267255
<goals>
268256
<goal>prepare-agent</goal>
269257
</goals>
270258
<configuration>
259+
<!-- the same agent parametrization is used for both ITs/UTs -->
271260
<skip>${skip.coverage}</skip>
272-
<destFile>${project.build.directory}/coverage-reports/jacoco-ut.exec</destFile>
273261
<propertyName>test.opts.coverage</propertyName>
262+
<!-- this is default, but make it more explicit, i.e. ITs just extend the existing execution data file-->
263+
<append>true</append>
274264
</configuration>
275265
</execution>
276266
<execution>
277-
<id>post-unit-test</id>
278-
<phase>test</phase>
267+
<id>generate-jacoco-report</id>
279268
<goals>
280269
<goal>report</goal>
281270
</goals>
282271
<configuration>
283272
<skip>${skip.coverage}</skip>
284-
<dataFile>${project.build.directory}/coverage-reports/jacoco-ut.exec</dataFile>
285-
<outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
286273
</configuration>
287274
</execution>
288275
<execution>
@@ -291,7 +278,6 @@
291278
<goal>check</goal>
292279
</goals>
293280
<configuration>
294-
<dataFile>${project.build.directory}/coverage-reports/jacoco-ut.exec</dataFile>
295281
<rules>
296282
<rule>
297283
<element>BUNDLE</element>

0 commit comments

Comments
 (0)