Skip to content

Commit

Permalink
module version with jacoco
Browse files Browse the repository at this point in the history
  • Loading branch information
homberghp committed Apr 20, 2020
1 parent 71d1774 commit f9c3fe8
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 13 deletions.
66 changes: 54 additions & 12 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
good looking Javadoc and a set of static test reports using spotbugs, pmd, and checkstyle.
This is NOT cargo-cult, because NONE of the dependencies in this pom will end up in your final product.

Version 2.3.6 added mockito jupiter plugin.
Version 2.3.6 added mockito jupiter plugin.
Version 2.3.8 bumps junit-jupyter from 5.6.0 to 5.6.2 and added jacoco command line for
modular projects

</description>

<developers>
Expand All @@ -25,7 +28,7 @@
</developers>
<groupId>nl.fontys.sebivenlo</groupId>
<artifactId>sebipom</artifactId>
<version>2.3.7</version>
<version>2.3.8</version>
<packaging>pom</packaging>
<name>SEBIVenlo :: SEBIPom</name>
<url>https://www.fontysvenlo.org/repository</url>
Expand All @@ -45,6 +48,11 @@
<java.lib.dir>/usr/share/java</java.lib.dir>
<java.release>11</java.release>
<mockito.core.version>3.2.4</mockito.core.version>
<junit.jupiter.version>5.6.2</junit.jupiter.version>
<jacoco.version>0.8.5</jacoco.version>
<!-- empty argline is used by surefire and set by jacoco profile -->
<jacocoArgLine></jacocoArgLine>
<argLine></argLine>
<!-- surefire 3.0.0-Mx uses incompatible message handling for
// asserttions.fail, uses CDATA instead of plain xml text, so for the time being stay at 2.22.2 -->
<maven.surefire.version>2.22.2</maven.surefire.version>
Expand Down Expand Up @@ -324,6 +332,11 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>
@{argLine}
</argLine>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down Expand Up @@ -381,22 +394,22 @@
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.6.0</version>
<version>${junit.jupiter.version}</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<version>5.6.0</version>
<version>${junit.jupiter.version}</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.6.0</version>
<version>${junit.jupiter.version}</version>
</dependency>
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<version>5.6.0</version>
<version>${junit.jupiter.version}</version>
</dependency>
<dependency>
<groupId>org.apiguardian</groupId>
Expand Down Expand Up @@ -578,8 +591,37 @@
</plugins>
</reporting>
</profile>
<profile>
<!--enable special class path for jacoco agent-->
<id>jacocomodule</id>
<activation>
<file>
<exists>${basedir}/src/main/java/module-info.java</exists>
</file>
</activation>
<properties>
<jacocoArgLine>
-javaagent:${settings.localRepository}/org/jacoco/org.jacoco.agent/${jacoco.version}/org.jacoco.agent-${jacoco.version}-runtime.jar=destfile=${project.build.directory}/jacoco.exec
</jacocoArgLine>
</properties>
</profile>
<profile>
<id>jacoco</id>
<properties>
<argLine>
${jacocoArgLine}
<!---javaagent:${settings.localRepository}/org/jacoco/org.jacoco.agent/${jacoco.version}/org.jacoco.agent-${jacoco.version}-runtime.jar=destfile=${project.build.directory}/jacoco.exec-->
</argLine>
</properties>
<dependencies>
<dependency>
<groupId>org.jacoco</groupId>
<artifactId>org.jacoco.agent</artifactId>
<version>${jacoco.version}</version>
<classifier>runtime</classifier>
<scope>test</scope>
</dependency>
</dependencies>
<build>

<plugins>
Expand Down Expand Up @@ -859,25 +901,25 @@
<additionalDependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.6.0</version>
<version>${junit.jupiter.version}</version>
<scope>test</scope>
</additionalDependency>
<additionalDependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<version>5.6.0</version>
<version>${junit.jupiter.version}</version>
<scope>test</scope>
</additionalDependency>
<additionalDependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.6.0</version>
<version>${junit.jupiter.version}</version>
<scope>test</scope>
</additionalDependency>
<additionalDependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<version>5.6.0</version>
<version>${junit.jupiter.version}</version>
<scope>test</scope>
</additionalDependency>
<additionalDependency>
Expand Down Expand Up @@ -948,15 +990,15 @@
<source>${java.release}</source>
<target>${java.release}</target>
<compilerArgs>
<arg>--enable-preview</arg>
<arg>@{argLine} --enable-preview</arg>
</compilerArgs>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>--enable-preview</argLine>
<argLine>@{argLine} --enable-preview</argLine>
</configuration>
</plugin>
</plugins>
Expand Down
2 changes: 1 addition & 1 deletion sebivenlo_checks.xml
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@
PARAMETER_DEF, VARIABLE_DEF, METHOD_DEF"/>
</module>
<!-- <module name="OverloadMethodsDeclarationOrder"/> -->
<module name="VariableDeclarationUsageDistance"/>
<!-- module name="VariableDeclarationUsageDistance"/ -->
<!-- be less strict on import order. HOM. -->
<!-- <module name="CustomImportOrder"> -->
<!-- <property name="sortImportsInGroupAlphabetically" value="true"/> -->
Expand Down

0 comments on commit f9c3fe8

Please sign in to comment.