After the latest java upgrade on at least debian and ubuntu maven surefire plugin stops working with this error:
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.0:test
(default-test) on project contrast-finder-utils: There are test failures.
Steps to reproduce the behaviour
git clone https://github.com/Asqatasun/Contrast-Finder.git
cd Contrast-Finder
mvn clean install
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<!-- Fixed a bug related to the surefire plugin
that will be solved in the next version of the plugin (after 2.22.1)
and we can then remove this patch -->
<useSystemClassLoader>false</useSystemClassLoader>
</configuration>
</plugin>
testing configuration
# Ubuntu 16.04
Apache Maven 3.3.9
openjdk version "1.8.0_181"
OpenJDK Runtime Environment (build 1.8.0_181-8u181-b13-1ubuntu0.16.04.1-b13)
OpenJDK 64-Bit Server VM (build 25.181-b13, mixed mode)
Observed behaviour
After the latest java upgrade on at least debian and ubuntu maven surefire plugin stops working with this error:
Steps to reproduce the behaviour
Expected behaviour
Surefire team is working on a fix (after 2.22.1) but in the mean time there is a work around. We could implement it until the plugin is fixed. See: https://github.com/jhipster/generator-jhipster/issues/8693
Related issues
Suggest a Fix
added this line in to the pom.xml:
like this:
testing configuration