Skip to content

Commit 74f4fe9

Browse files
committed
Adding JaCoCo maven plugin
1 parent 1e60896 commit 74f4fe9

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

pom.xml

+49
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,39 @@
6767
</dependencies>
6868

6969
<profiles>
70+
71+
<profile>
72+
<id>jacoco</id>
73+
<properties>
74+
<it.jacoco.destFile>${java.io.tmpdir}/jacoco.data</it.jacoco.destFile>
75+
<sonar.jacoco.itReportPath>${it.jacoco.destFile}</sonar.jacoco.itReportPath>
76+
</properties>
77+
<activation>
78+
<activeByDefault>false</activeByDefault>
79+
</activation>
80+
<build>
81+
<plugins>
82+
<plugin>
83+
<groupId>org.jacoco</groupId>
84+
<artifactId>jacoco-maven-plugin</artifactId>
85+
<version>0.5.7.201204190339</version>
86+
<executions>
87+
<execution>
88+
<phase>pre-integration-test</phase>
89+
<goals>
90+
<goal>prepare-agent</goal>
91+
</goals>
92+
</execution>
93+
</executions>
94+
<configuration>
95+
<propertyName>it.failsafe.argLine</propertyName>
96+
<destFile>${it.jacoco.destFile}</destFile>
97+
</configuration>
98+
</plugin>
99+
</plugins>
100+
</build>
101+
</profile>
102+
70103
<profile>
71104
<id>glassfish-embedded</id>
72105
<activation>
@@ -97,6 +130,9 @@
97130
<groupId>org.apache.maven.plugins</groupId>
98131
<artifactId>maven-failsafe-plugin</artifactId>
99132
<version>${version.maven.failsafe.plugin}</version>
133+
<configuration>
134+
<argLine>${it.failsafe.argLine}</argLine>
135+
</configuration>
100136
<executions>
101137
<execution>
102138
<goals>
@@ -143,6 +179,9 @@
143179
<groupId>org.apache.maven.plugins</groupId>
144180
<artifactId>maven-failsafe-plugin</artifactId>
145181
<version>${version.maven.failsafe.plugin}</version>
182+
<configuration>
183+
<argLine>${it.failsafe.argLine}</argLine>
184+
</configuration>
146185
<executions>
147186
<execution>
148187
<goals>
@@ -185,6 +224,9 @@
185224
<groupId>org.apache.maven.plugins</groupId>
186225
<artifactId>maven-failsafe-plugin</artifactId>
187226
<version>${version.maven.failsafe.plugin}</version>
227+
<configuration>
228+
<argLine>${it.failsafe.argLine}</argLine>
229+
</configuration>
188230
<executions>
189231
<execution>
190232
<goals>
@@ -233,6 +275,9 @@
233275
<groupId>org.apache.maven.plugins</groupId>
234276
<artifactId>maven-failsafe-plugin</artifactId>
235277
<version>${version.maven.failsafe.plugin}</version>
278+
<configuration>
279+
<argLine>${it.failsafe.argLine}</argLine>
280+
</configuration>
236281
<executions>
237282
<execution>
238283
<goals>
@@ -356,6 +401,10 @@
356401
<id>apache-snapshot</id>
357402
<url>https://repository.apache.org/content/repositories/snapshots/</url>
358403
</pluginRepository>
404+
<pluginRepository>
405+
<id>maven-central</id>
406+
<url>http://repo1.maven.org/maven2/</url>
407+
</pluginRepository>
359408
</pluginRepositories>
360409

361410
</project>

0 commit comments

Comments
 (0)