Surefire bug preventing build with OpenJDK on Ubuntu
stw5768 opened this issue · 2 comments
stw5768 commented
Affected Java version: OpenJDK 1.8.0_181-8u181-b13
Affected Operating System: Debian / Ubuntu
As stated here on Stackoverflow, existing bugs in above mentioned OpenJDK versions and the surefire plugin osgi.enroute depends on cause this bug.
mvn verify
output:
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] quickstart
[INFO] rest
[INFO] app
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building quickstart 0.0.2-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building rest 0.0.2-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ rest ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 4 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ rest ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- bnd-maven-plugin:4.1.0:bnd-process (default) @ rest ---
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ rest ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/xayah/dev/e-mundo/osgi/osgi.enroute/examples/quickstart/rest/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ rest ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ rest ---
[INFO] Surefire report directory: /home/xayah/dev/e-mundo/osgi/osgi.enroute/examples/quickstart/rest/target/surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Error: Could not find or load main class org.apache.maven.surefire.booter.ForkedBooter
Results :
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] quickstart ......................................... SUCCESS [ 0.001 s]
[INFO] rest ............................................... FAILURE [ 1.247 s]
[INFO] app ................................................ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.364 s
[INFO] Finished at: 2018-11-03T14:07:21+01:00
[INFO] Final Memory: 14M/240M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on project rest: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test failed: The forked VM terminated without saying properly goodbye. VM crash or System.exit called ? -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :rest
stw5768 commented
A workaround working for me was to disable the check for class path URLs by adding the following to the section of my ~/.m2/settings.xml
(as mentioned here):
<profile>
<id>SUREFIRE-1588</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<argLine>-Djdk.net.URLClassPath.disableClassPathURLCheck=true</argLine>
</properties>
</profile>
timothyjward commented
With luck the Surefire team will have this fixed soon. I think it's affecting a lot of people!