brewphone
brewphone

Reputation: 1366

Jenkins Maven how to fix wrong command

Learning Jenkins. Windows 7 running jenkins-2.73.3, a maven project gives following output:

20:29:11 [test] $ "C:\Program Files\Java\jdk1.8.0_102/bin/java" –Xmx1024m –XX:MaxPermSize=256m -cp "C:\Program Files (x86)\Jenkins\plugins\maven-plugin\WEB-INF\lib\maven33-agent-1.12-alpha-1.jar;C:\Apps\apache-maven-3.3.9\boot\plexus-classworlds-2.5.2.jar;C:\Apps\apache-maven-3.3.9/conf/logging" jenkins.maven3.agent.Maven33Main C:\Apps\apache-maven-3.3.9 "C:\Program Files (x86)\Jenkins\war\WEB-INF\lib\remoting-3.10.2.jar" "C:\Program Files (x86)\Jenkins\plugins\maven-plugin\WEB-INF\lib\maven33-interceptor-1.12-alpha-1.jar" "C:\Program Files (x86)\Jenkins\plugins\maven-plugin\WEB-INF\lib\maven3-interceptor-commons-1.12-alpha-1.jar" 50129 20:29:11 Error: Could not find or load main class –Xmx1024m 20:29:41 ERROR: Failed to launch Maven. Exit code = 1 20:29:41 Finished: FAILURE

The problem is obvious: java takes -Xmx1024m as the main class. But the command is generated, how can I move "-Xmx.. -XX:Max.." to the end of the command?

Upvotes: 0

Views: 354

Answers (1)

brewphone
brewphone

Reputation: 1366

Removing "–Xmx1024m –XX:MaxPermSize=256m" from Maven Project Configuration / Global MAVEN_OPTS on Jenkins fixed the issue.

Upvotes: 0

Related Questions