Problem: Sometimes you get the RunTime exception in your java projects. Example in an enterprise spring boot application when you use:
> mvn clean install
or, mvn package
See the error snapshot below:
Tests run: 325, Failures: 0, Errors: 0, Skipped: 0
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 24:49 min
[INFO] Finished at: 2020-04-13T13:25:50+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test (default-test) on project postbooking-ndc-pad: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test failed: java.lang.RuntimeException: org.apache.maven.surefire.report.ReporterException: When writing xml report stdout/stderr: /var/folders/3r/wl3bcq6x0cq1_zxj94xtz6ww0000gn/T/stdout8283814721678605256deferred (No such file or directory) -> [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
Root cause:
This mainly happens because of using wrong/ old version of suefire in your pom.xml while some parts of your code requires higher versions in compilation.
Possible remediation:
1. Either ignore tests while building
>mvn install -DskipTests
2. or, use latest Surefire in pom.xml 2.22.0
No comments:
Post a Comment