promagent-agent loaded from the system class loader FAILURE
iankittomar opened this issue · comments
Command Pass
mvn clean install
[INFO] ------------------------------------------------------- [INFO] T E S T S [INFO] ------------------------------------------------------- [INFO] Running io.promagent.agent.JarFilesTest [INFO] [INFO] Results: [INFO] [INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0 [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] [INFO] promagent framework 1.0-SNAPSHOT ................... SUCCESS [ 0.434 s] [INFO] promagent-agent loaded from the system class loader FAILURE [ 7.030 s] [INFO] promagent-api API for implementing hooks ........... SKIPPED [INFO] promagent-internal classes shared across deployments SKIPPED [INFO] promagent.war ...................................... SKIPPED [INFO] promagent-maven-plugin 1.0-SNAPSHOT ................ SKIPPED [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 7.578 s [INFO] Finished at: 2018-08-09T18:34:46+02:00 [INFO] ------------------------------------------------------------------------ [ERROR] Java heap space -> [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/OutOfMemoryError
I am using JAVA8
This is weird. It seems that the build fails because it runs out of memory. I tried a few settings, and even with 32M heap space the build works fine (MAVEN_OPTS="-Xmx32m"
).
Could you try again? Maybe something else was running on your machine so that you actually ran out of memory.
I have tried this but, I am getting the same result.
Please tell me exactly which Java version, Maven version and OS you are using, so I can try to reproduce it. I am using Java 1.8.0_172
and Maven 3.5.4
on macOS.
I can reproduce the error on Windows. It seems to be related to the beta version of Junit5. As a quick workaround, try the following two changes in promagent-framework/pom.xml
:
- Update the Junit5 version:
<junit5.version>5.0.0-RC2</junit5.version>
-><junit5.version>5.2.0</junit5.version>
- Remove this dependency:
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-surefire-provider</artifactId>
<version>${junit5.surefire.version}</version>
</dependency>
I didn't commit this change yet, because I want to make sure that this does not cause any problems with the docker tests on macOS or Linux. But it seems to fix the build issue on Windows.
It seems you also added <scope>test</scope>
in the plugin configuration (the highlighted line in your screen shot). This should be removed.