Как исправить проблему с версией Maven и Jacoco? - PullRequest
0 голосов
/ 04 июня 2019

Я пытаюсь запустить «mvn clean package» для компиляции моего кода. Я получаю ошибку, как это.

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test 
(default-test) on project hilton-rest-gen: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test failed: 
The forked VM terminated without properly saying goodbye. VM crash or System.exit called?
[ERROR] Command was /bin/sh -c cd /Users/ronhoward/rest-gen-develop && /Library/Java/JavaVirtualMachines/jdk-11.0.1.jdk/Contents/Home/bin/java 
-javaagent:/Users/ronhoward/.m2/repository/org/jacoco/org.jacoco.agent/0.8.1/org.jacoco.agent-0.8.1-runtime.jar=destfile=/Users/ronhoward/rest-gen-develop/target/coverage-reports/jacoco-unit.exec 
-jar /Users/ronhoward/rest-gen-develop/target/surefire/surefirebooter11844541132864858315.jar 
/Users/ronhoward/rest-gen-develop/target/surefire/surefire12749876885671721861tmp 
/Users/ronhoward/rest-gen-develop/target/surefire/surefire_03804673154865947634tmp
[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

Любые предложения о том, как я могу решить эту проблему?

1 Ответ

1 голос
/ 19 июня 2019

Согласно вашему журналу вы используете версию 11 Java и версию JaCoCo 0.8.1

.../JavaVirtualMachines/jdk-11.0.1.jdk/Contents/Home/bin/java
-javaagent:.../org.jacoco.agent-0.8.1-runtime.jar...

Однако согласно журналу изменений JaCoCo https://www.jacoco.org/jacoco/trunk/doc/changes.htmlэкспериментальная поддержка Java 11 была добавлена ​​в JaCoCo 0.8.2, а не экспериментальная - 0.8.3 .

Поэтому обновите pom.xml файл (ы), чтобы использовать эту версию или даже лучше - чтобы использовать последние версии 0.8.4 .

.
...