Skip to content

Commit 1e644eb

Browse files
authored
#29: Added Jacoco coverage plugin and fixed Sonar coverage badge (#38)
Fixes #29
1 parent 3fc5929 commit 1e644eb

File tree

7 files changed

+106
-78
lines changed

7 files changed

+106
-78
lines changed

.github/workflows/ci-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
- name: Sonar analysis
5757
if: ${{ env.SONAR_TOKEN != null && startsWith(matrix.scala-version, 'scala2.13') }}
5858
run: |
59-
mvn --batch-mode scoverage:report org.sonarsource.scanner.maven:sonar-maven-plugin:sonar \
59+
mvn --batch-mode org.sonarsource.scanner.maven:sonar-maven-plugin:sonar \
6060
-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \
6161
-DtrimStackTrace=false \
6262
-P${{ matrix.scala-version }} \

dependencies.md

Lines changed: 53 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -16,37 +16,37 @@
1616

1717
## Test Dependencies
1818

19-
| Dependency | License |
20-
| --------------------------- | ----------------------------------------- |
21-
| [scalatest][15] | [the Apache License, ASL Version 2.0][16] |
22-
| [scalatestplus-mockito][17] | [Apache-2.0][16] |
23-
| [mockito-core][18] | [The MIT License][19] |
19+
| Dependency | License |
20+
| ----------------------------------------- | ----------------------------------------- |
21+
| [scalatest][15] | [the Apache License, ASL Version 2.0][16] |
22+
| [scalatestplus-mockito][17] | [Apache-2.0][16] |
23+
| [mockito-core][18] | [The MIT License][19] |
24+
| [EqualsVerifier | release normal jar][20] | [Apache License, Version 2.0][7] |
2425

2526
## Plugin Dependencies
2627

2728
| Dependency | License |
2829
| ------------------------------------------------------- | --------------------------------------------- |
29-
| [SonarQube Scanner for Maven][20] | [GNU LGPL 3][21] |
30-
| [Apache Maven Compiler Plugin][22] | [Apache License, Version 2.0][7] |
31-
| [Apache Maven Enforcer Plugin][23] | [Apache License, Version 2.0][7] |
32-
| [Maven Flatten Plugin][24] | [Apache Software Licenese][9] |
33-
| [org.sonatype.ossindex.maven:ossindex-maven-plugin][25] | [ASL2][9] |
34-
| [Reproducible Build Maven Plugin][26] | [Apache 2.0][9] |
35-
| [scala-maven-plugin][27] | [Public domain (Unlicense)][28] |
36-
| [Maven Surefire Plugin][29] | [Apache License, Version 2.0][7] |
37-
| [Versions Maven Plugin][30] | [Apache License, Version 2.0][7] |
38-
| [Apache Maven Deploy Plugin][31] | [Apache License, Version 2.0][7] |
39-
| [Apache Maven GPG Plugin][32] | [Apache License, Version 2.0][7] |
40-
| [Apache Maven Source Plugin][33] | [Apache License, Version 2.0][7] |
41-
| [Apache Maven Javadoc Plugin][34] | [Apache License, Version 2.0][7] |
42-
| [Nexus Staging Maven Plugin][35] | [Eclipse Public License][36] |
43-
| [JaCoCo :: Maven Plugin][37] | [Eclipse Public License 2.0][38] |
44-
| [error-code-crawler-maven-plugin][39] | [MIT][5] |
45-
| [ScalaTest Maven Plugin][40] | [the Apache License, ASL Version 2.0][16] |
46-
| [Apache Maven Assembly Plugin][41] | [Apache License, Version 2.0][7] |
47-
| [OpenFastTrace Maven Plugin][42] | [GNU General Public License v3.0][43] |
48-
| [Project keeper maven plugin][44] | [The MIT License][45] |
49-
| [SCoverage Maven Plugin][46] | [The Apache Software License, Version 2.0][9] |
30+
| [SonarQube Scanner for Maven][21] | [GNU LGPL 3][22] |
31+
| [Apache Maven Compiler Plugin][23] | [Apache License, Version 2.0][7] |
32+
| [Apache Maven Enforcer Plugin][24] | [Apache License, Version 2.0][7] |
33+
| [Maven Flatten Plugin][25] | [Apache Software Licenese][9] |
34+
| [org.sonatype.ossindex.maven:ossindex-maven-plugin][26] | [ASL2][9] |
35+
| [Reproducible Build Maven Plugin][27] | [Apache 2.0][9] |
36+
| [scala-maven-plugin][28] | [Public domain (Unlicense)][29] |
37+
| [Maven Surefire Plugin][30] | [Apache License, Version 2.0][7] |
38+
| [Versions Maven Plugin][31] | [Apache License, Version 2.0][7] |
39+
| [Apache Maven Deploy Plugin][32] | [Apache License, Version 2.0][7] |
40+
| [Apache Maven GPG Plugin][33] | [Apache License, Version 2.0][7] |
41+
| [Apache Maven Source Plugin][34] | [Apache License, Version 2.0][7] |
42+
| [Apache Maven Javadoc Plugin][35] | [Apache License, Version 2.0][7] |
43+
| [Nexus Staging Maven Plugin][36] | [Eclipse Public License][37] |
44+
| [JaCoCo :: Maven Plugin][38] | [Eclipse Public License 2.0][39] |
45+
| [error-code-crawler-maven-plugin][40] | [MIT][5] |
46+
| [ScalaTest Maven Plugin][41] | [the Apache License, ASL Version 2.0][16] |
47+
| [Apache Maven Assembly Plugin][42] | [Apache License, Version 2.0][7] |
48+
| [OpenFastTrace Maven Plugin][43] | [GNU General Public License v3.0][44] |
49+
| [Project keeper maven plugin][45] | [The MIT License][46] |
5050
| [Scalastyle Maven Plugin][47] | [Apache 2.0][14] |
5151
| [spotless-maven-plugin][48] | [The Apache Software License, Version 2.0][7] |
5252
| [scalafix-maven-plugin][49] | [BSD-3-Clause][50] |
@@ -76,33 +76,33 @@
7676
[17]: https://github.com/scalatest/scalatestplus-mockito
7777
[18]: https://github.com/mockito/mockito
7878
[19]: https://github.com/mockito/mockito/blob/main/LICENSE
79-
[20]: http://sonarsource.github.io/sonar-scanner-maven/
80-
[21]: http://www.gnu.org/licenses/lgpl.txt
81-
[22]: https://maven.apache.org/plugins/maven-compiler-plugin/
82-
[23]: https://maven.apache.org/enforcer/maven-enforcer-plugin/
83-
[24]: https://www.mojohaus.org/flatten-maven-plugin/
84-
[25]: https://sonatype.github.io/ossindex-maven/maven-plugin/
85-
[26]: http://zlika.github.io/reproducible-build-maven-plugin
86-
[27]: http://github.com/davidB/scala-maven-plugin
87-
[28]: http://unlicense.org/
88-
[29]: https://maven.apache.org/surefire/maven-surefire-plugin/
89-
[30]: http://www.mojohaus.org/versions-maven-plugin/
90-
[31]: https://maven.apache.org/plugins/maven-deploy-plugin/
91-
[32]: https://maven.apache.org/plugins/maven-gpg-plugin/
92-
[33]: https://maven.apache.org/plugins/maven-source-plugin/
93-
[34]: https://maven.apache.org/plugins/maven-javadoc-plugin/
94-
[35]: http://www.sonatype.com/public-parent/nexus-maven-plugins/nexus-staging/nexus-staging-maven-plugin/
95-
[36]: http://www.eclipse.org/legal/epl-v10.html
96-
[37]: https://www.jacoco.org/jacoco/trunk/doc/maven.html
97-
[38]: https://www.eclipse.org/legal/epl-2.0/
98-
[39]: https://github.com/exasol/error-code-crawler-maven-plugin
99-
[40]: https://www.scalatest.org/user_guide/using_the_scalatest_maven_plugin
100-
[41]: https://maven.apache.org/plugins/maven-assembly-plugin/
101-
[42]: https://github.com/itsallcode/openfasttrace-maven-plugin
102-
[43]: https://www.gnu.org/licenses/gpl-3.0.html
103-
[44]: https://github.com/exasol/project-keeper/
104-
[45]: https://github.com/exasol/project-keeper/blob/main/LICENSE
105-
[46]: https://scoverage.github.io/scoverage-maven-plugin/1.4.11/
79+
[20]: https://www.jqno.nl/equalsverifier
80+
[21]: http://sonarsource.github.io/sonar-scanner-maven/
81+
[22]: http://www.gnu.org/licenses/lgpl.txt
82+
[23]: https://maven.apache.org/plugins/maven-compiler-plugin/
83+
[24]: https://maven.apache.org/enforcer/maven-enforcer-plugin/
84+
[25]: https://www.mojohaus.org/flatten-maven-plugin/
85+
[26]: https://sonatype.github.io/ossindex-maven/maven-plugin/
86+
[27]: http://zlika.github.io/reproducible-build-maven-plugin
87+
[28]: http://github.com/davidB/scala-maven-plugin
88+
[29]: http://unlicense.org/
89+
[30]: https://maven.apache.org/surefire/maven-surefire-plugin/
90+
[31]: http://www.mojohaus.org/versions-maven-plugin/
91+
[32]: https://maven.apache.org/plugins/maven-deploy-plugin/
92+
[33]: https://maven.apache.org/plugins/maven-gpg-plugin/
93+
[34]: https://maven.apache.org/plugins/maven-source-plugin/
94+
[35]: https://maven.apache.org/plugins/maven-javadoc-plugin/
95+
[36]: http://www.sonatype.com/public-parent/nexus-maven-plugins/nexus-staging/nexus-staging-maven-plugin/
96+
[37]: http://www.eclipse.org/legal/epl-v10.html
97+
[38]: https://www.jacoco.org/jacoco/trunk/doc/maven.html
98+
[39]: https://www.eclipse.org/legal/epl-2.0/
99+
[40]: https://github.com/exasol/error-code-crawler-maven-plugin
100+
[41]: https://www.scalatest.org/user_guide/using_the_scalatest_maven_plugin
101+
[42]: https://maven.apache.org/plugins/maven-assembly-plugin/
102+
[43]: https://github.com/itsallcode/openfasttrace-maven-plugin
103+
[44]: https://www.gnu.org/licenses/gpl-3.0.html
104+
[45]: https://github.com/exasol/project-keeper/
105+
[46]: https://github.com/exasol/project-keeper/blob/main/LICENSE
106106
[47]: http://www.scalastyle.org
107107
[48]: https://github.com/diffplug/spotless
108108
[49]: https://github.com/evis/scalafix-maven-plugin

doc/changes/changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Changes
22

3+
* [0.4.3](changes_0.4.3.md)
34
* [0.4.2](changes_0.4.2.md)
45
* [0.4.1](changes_0.4.1.md)
56
* [0.4.0](changes_0.4.0.md)

doc/changes/changes_0.4.3.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Import Export UDF Common Scala 0.4.3, released 2022-??-??
2+
3+
Code name:
4+
5+
## Summary
6+
7+
## Refactoring
8+
9+
* #29: Changed to Jacoco coverage plugin and fixed Sonar coverage badge
10+
11+
## Dependency Updates
12+
13+
### Test Dependency Updates
14+
15+
* Added `nl.jqno.equalsverifier:equalsverifier:3.10.1`
16+
17+
### Plugin Dependency Updates
18+
19+
* Removed `org.scoverage:scoverage-maven-plugin:1.4.11`

pk_generated_parent.pom

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>com.exasol</groupId>
55
<artifactId>import-export-udf-common-scala-generated-parent</artifactId>
6-
<version>0.4.2</version>
6+
<version>0.4.3</version>
77
<packaging>pom</packaging>
88
<properties>
99
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

pom.xml

Lines changed: 26 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,16 @@
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>com.exasol</groupId>
55
<artifactId>import-export-udf-common-scala</artifactId>
6-
<version>0.4.2</version>
6+
<version>0.4.3</version>
77
<name>Import Export UDF Common Scala</name>
88
<description>Common import export libraries used in Exasol user defined functions</description>
99
<url>https://github.com/exasol/import-export-udf-common-scala/</url>
10+
<parent>
11+
<artifactId>import-export-udf-common-scala-generated-parent</artifactId>
12+
<groupId>com.exasol</groupId>
13+
<version>0.4.3</version>
14+
<relativePath>pk_generated_parent.pom</relativePath>
15+
</parent>
1016
<properties>
1117
<!-- runtime dependency versions -->
1218
<exasol.api.version>6.1.7</exasol.api.version>
@@ -20,6 +26,8 @@
2026
<scalatest.version>3.2.13</scalatest.version>
2127
<scalatestplus.version>1.0.0-M2</scalatestplus.version>
2228
<mockito.version>4.6.1</mockito.version>
29+
<sonar.sources>.</sonar.sources>
30+
<sonar.inclusions>src/main/**</sonar.inclusions>
2331
</properties>
2432
<distributionManagement>
2533
<snapshotRepository>
@@ -139,6 +147,12 @@
139147
<version>${mockito.version}</version>
140148
<scope>test</scope>
141149
</dependency>
150+
<dependency>
151+
<groupId>nl.jqno.equalsverifier</groupId>
152+
<artifactId>equalsverifier</artifactId>
153+
<version>3.10.1</version>
154+
<scope>test</scope>
155+
</dependency>
142156
</dependencies>
143157
<build>
144158
<finalName>${project.artifactId}_${scala.compat.version}-${project.version}</finalName>
@@ -217,26 +231,31 @@
217231
<plugin>
218232
<groupId>org.apache.maven.plugins</groupId>
219233
<artifactId>maven-surefire-plugin</artifactId>
220-
<configuration>
221-
<skipTests>true</skipTests>
222-
</configuration>
234+
<executions>
235+
<execution>
236+
<id>default-test</id>
237+
<phase>none</phase>
238+
</execution>
239+
</executions>
223240
</plugin>
224241
<plugin>
225242
<groupId>org.scalatest</groupId>
226243
<artifactId>scalatest-maven-plugin</artifactId>
227244
<version>2.0.2</version>
228245
<configuration>
229246
<junitxml>.</junitxml>
230-
<filereports>TestSuite.txt</filereports>
231-
<argLine>-Djava.util.logging.config.file=src/test/resources/logging.properties</argLine>
232-
<reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
247+
<argLine>-Djava.util.logging.config.file=src/test/resources/logging.properties ${argLine}</argLine>
233248
</configuration>
234249
<executions>
235250
<execution>
236251
<id>test</id>
237252
<goals>
238253
<goal>test</goal>
239254
</goals>
255+
<configuration>
256+
<filereports>TestSuite.txt</filereports>
257+
<reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
258+
</configuration>
240259
</execution>
241260
</executions>
242261
</plugin>
@@ -295,16 +314,6 @@
295314
</execution>
296315
</executions>
297316
</plugin>
298-
<plugin>
299-
<groupId>org.scoverage</groupId>
300-
<artifactId>scoverage-maven-plugin</artifactId>
301-
<version>1.4.11</version>
302-
<configuration>
303-
<scalaVersion>${scala.version}</scalaVersion>
304-
<aggregate>true</aggregate>
305-
<highlighting>true</highlighting>
306-
</configuration>
307-
</plugin>
308317
<plugin>
309318
<groupId>org.scalastyle</groupId>
310319
<artifactId>scalastyle-maven-plugin</artifactId>
@@ -395,10 +404,4 @@
395404
</properties>
396405
</profile>
397406
</profiles>
398-
<parent>
399-
<artifactId>import-export-udf-common-scala-generated-parent</artifactId>
400-
<groupId>com.exasol</groupId>
401-
<version>0.4.2</version>
402-
<relativePath>pk_generated_parent.pom</relativePath>
403-
</parent>
404407
</project>

src/test/scala/com/exasol/common/PropertiesParserTest.scala

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package com.exasol.common
22

3+
import nl.jqno.equalsverifier.EqualsVerifier
34
import org.scalatest.funsuite.AnyFunSuite
45

56
class PropertiesParserTest extends AnyFunSuite {
@@ -28,4 +29,8 @@ class PropertiesParserTest extends AnyFunSuite {
2829
assert(parser.mapToString(Map.empty[String, String]) === "")
2930
}
3031

32+
test("verify contract") {
33+
EqualsVerifier.forClass(classOf[PropertiesParser]).verify()
34+
}
35+
3136
}

0 commit comments

Comments
 (0)