mkymikky/DupFinder

master kompiliert aktuell nicht

Closed this issue · 3 comments

Gerade unter debian linux via git ssh frisch das Projekt ausgecheckt und mvn clean install ausgeführt -> Runtime Fehler in den Tests.

huluvu424242@stachel:~/git/tmp/DupFinder$ mvn clean install
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building DupFinder 0.0.2
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ DupFinder ---
[INFO] 
[INFO] --- jacoco-maven-plugin:0.7.7.201606060606:prepare-agent (default) @ DupFinder ---
[INFO] argLine set to -javaagent:/home/huluvu424242/.m2/repository/org/jacoco/org.jacoco.agent/0.7.7.201606060606/org.jacoco.agent-0.7.7.201606060606-runtime.jar=destfile=/home/huluvu424242/git/tmp/DupFinder/target/jacoco.exec
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ DupFinder ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/huluvu424242/git/tmp/DupFinder/src/main/resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ DupFinder ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 7 source files to /home/huluvu424242/git/tmp/DupFinder/target/classes
[INFO] 
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ DupFinder ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 8 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ DupFinder ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 8 source files to /home/huluvu424242/git/tmp/DupFinder/target/test-classes
[INFO] 
[INFO] --- maven-surefire-plugin:2.17:test (default-test) @ DupFinder ---
[INFO] Surefire report directory: /home/huluvu424242/git/tmp/DupFinder/target/surefire-reports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Fehler: Hauptklasse org.apache.maven.surefire.booter.ForkedBooter konnte nicht gefunden oder geladen werden

Results :

Tests run: 0, Failures: 0, Errors: 0, Skipped: 0

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 36.418 s
[INFO] Finished at: 2018-11-04T16:49:04+01:00
[INFO] Final Memory: 18M/104M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.17:test (default-test) on project DupFinder: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.17:test failed: The forked VM terminated without properly saying goodbye. VM crash or System.exit called?
[ERROR] Command was /bin/sh -c cd /home/huluvu424242/git/tmp/DupFinder && /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java -javaagent:/home/huluvu424242/.m2/repository/org/jacoco/org.jacoco.agent/0.7.7.201606060606/org.jacoco.agent-0.7.7.201606060606-runtime.jar=destfile=/home/huluvu424242/git/tmp/DupFinder/target/jacoco.exec -jar /home/huluvu424242/git/tmp/DupFinder/target/surefire/surefirebooter594168181266561992.jar /home/huluvu424242/git/tmp/DupFinder/target/surefire/surefire7879704634770657433tmp /home/huluvu424242/git/tmp/DupFinder/target/surefire/surefire_08507726076718787793tmp
[ERROR] -> [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
huluvu424242@stachel:~/git/tmp/DupFinder$ 

Ausgeführt in folgender Umgebung:

huluvu424242@stachel:~/git/tmp/DupFinder$ mvn --version
Apache Maven 3.3.9
Maven home: /usr/share/maven
Java version: 1.8.0_181, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-8-openjdk-amd64/jre
Default locale: de_DE, platform encoding: UTF-8
OS name: "linux", version: "4.9.0-8-amd64", arch: "amd64", family: "unix"
huluvu424242@stachel:~/git/tmp/DupFinder$ 

Workaround
mvn -DskipTests=true clean install

Das issue kann geschlossen werden. Meine Analyse ergab es liegt an meiner lokalen JVM. Leider kann ich aktuell nicht wechseln.
Hab hier ein paar Testläufe mit kombinierten Umgebungen durchgeführt wie: maven3.5.2 maven3.3.9 oraclejdk8 openjdk8 openjdk9

https://travis-ci.org/FunThomas424242/DupFinder/builds

(Ist ein Branch welcher von Deinem aktuellen master agezogen wurde)

[Update] Hab heute zumindest die Ursache im Internet gefunden. Betrifft die Kombination von Linux openjdk8 und maven surefire plugin. Beiden haben einen bug.
https://stackoverflow.com/questions/53010200/maven-surefire-could-not-find-forkedbooter-class

Eine Lösung für das Problem habe ich noch nicht gefunden. Offizielle Updates gibts gerade nicht und ein downgrade möchte ich vermeiden. Ein Umstieg auf oracle 8 ist mir zu aufwendig, da ich bei jeder Systemaktualisierung scheinbar dran denken muss, dass es nicht rausfliegt.

[Update] Folgende Lösung funktioniert bei anderen Projekten:
https://stackoverflow.com/questions/50661648/spring-boot-fails-to-run-maven-surefire-plugin-classnotfoundexception-org-apache

Anpassung der Quellen sollte nicht erfolgen, da es ein Bug in 3th libs ist.