Skip to content

Commit

Permalink
Downgrade to surefire 2.19.1
Browse files Browse the repository at this point in the history
The combination of Java 11, the junit version, the surefire plugin version and
the plugin config `forkCount` and `reuseForks` caused a variety of
failures when running the tests, most frequently a ClassNotFoundException like this:

ClassNotFoundException: org.apache.maven.plugin.surefire.StartupReportConfiguration

It is not entirely clear what the correct way to fix this but it occurs
even when you use version 3.0.0-M3 of the surefire plugin, which is the
newest released version as of writing this. Perhaps also upgrading to
junit 5 might resolve this, but that seemed a little beyond the scope of
the PR.

The least invasive choice was to downgrade the surefire plugin version.

junit-team/junit5#1367
https://jira.apache.org/jira/browse/SUREFIRE-1520
https://issues.apache.org/jira/browse/SUREFIRE-1534
https://stackoverflow.com/questions/53437819/maven-surefire-and-jdk-11
  • Loading branch information
leonardehrenfried committed Sep 11, 2019
1 parent 7cc40b6 commit ca708cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pom.xml
Expand Up @@ -258,7 +258,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M3</version>
<version>2.19.1</version>
<configuration>
<argLine>-Xmx2G</argLine>
<argLine>-Dfile.encoding=UTF-8</argLine>
Expand Down

0 comments on commit ca708cc

Please sign in to comment.