Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Surefire bug preventing build with OpenJDK on Ubuntu #87

Open
stw5768 opened this issue Nov 3, 2018 · 2 comments
Open

Surefire bug preventing build with OpenJDK on Ubuntu #87

stw5768 opened this issue Nov 3, 2018 · 2 comments

Comments

@stw5768
Copy link

stw5768 commented Nov 3, 2018

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
Copy link
Author

stw5768 commented Nov 3, 2018

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
Copy link
Contributor

With luck the Surefire team will have this fixed soon. I think it's affecting a lot of people!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants