Skip to content

Commit 3a615cd

Browse files
add jococo plugin for code coverage with "mvn jacoco:report"
1 parent d9b89b2 commit 3a615cd

File tree

1 file changed

+23
-3
lines changed

1 file changed

+23
-3
lines changed

sqldev/pom.xml

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
<!-- requires SQL Developer 4.1.0 or higher (first version based on JDK 1.8) -->
1515
<sqldev.basedir>/Applications/SQLDeveloper19.4.0.app/Contents/Resources/sqldeveloper</sqldev.basedir>
1616
<final.name>utplsql_for_SQLDev_${project.version}</final.name>
17+
<!-- arguments to by added by jacoco plugin for test runs with coverage -->
18+
<!-- -noverify is required in some environments to avoid java.lang.VerifyError -->
19+
<argLine>-noverify -Djava.util.logging.config.file=${project.basedir}/src/test/resources/logging.conf</argLine>
1720
</properties>
1821
<dependencies>
1922
<!-- SQL Developer specific dependencies part 1 (not available in public Maven repositories) -->
@@ -237,9 +240,7 @@
237240
<artifactId>maven-surefire-plugin</artifactId>
238241
<version>2.22.2</version>
239242
<configuration>
240-
<!-- -noverify is required in some environments to avoid java.lang.VerifyError -->
241-
<argLine>-noverify
242-
-Djava.util.logging.config.file=${project.basedir}/src/test/resources/logging.conf</argLine>
243+
<!-- argline moved to properties, to make it work with jacoco plugin -->
243244
<includes>
244245
<include>**/*.java</include>
245246
</includes>
@@ -453,6 +454,25 @@
453454
</execution>
454455
</executions>
455456
</plugin>
457+
<plugin>
458+
<groupId>org.jacoco</groupId>
459+
<artifactId>jacoco-maven-plugin</artifactId>
460+
<version>0.8.5</version>
461+
<executions>
462+
<execution>
463+
<goals>
464+
<goal>prepare-agent</goal>
465+
</goals>
466+
</execution>
467+
<execution>
468+
<id>report</id>
469+
<phase>prepare-package</phase>
470+
<goals>
471+
<goal>report</goal>
472+
</goals>
473+
</execution>
474+
</executions>
475+
</plugin>
456476
</plugins>
457477
<pluginManagement>
458478
<plugins>

0 commit comments

Comments
 (0)