I installed Jenkins 1.512 on CentOS (info as follows) and configured it to work with apache-maven-3.0.4.
Linux server.masstermmind.com 2.6.32-358.2.1.el6.x86_64 #1 SMP Tue Mar 12 14:18:09 CDT 2013 x86_64 x86_64 x86_64 GNU/Linux
I was actually trying to solve a problem where Maven complained about missing vaule of jbossHome
parameter in the pom.xml
file. So, I decided to debug Maven by putting the -X
option in Jenkins MAVEN_OPTS
. But it complained that I put in an incorrect Java argument:
The -X options are non-standard and subject to change without notice.
It turned out Jenkins thinks I put in an argument for Java. Later I found out the command generated by Jenkins was like the following:
/usr/java/jdk1.7.0_17/bin/java -X -cp /var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven3-agent-1.2.jar:/usr/share/apache-maven-3.0.5/boot/plexus-classworlds-2.4.jar org.jvnet.hudson.maven3.agent.Maven3Main /usr/share/apache-maven-3.0.5 /var/cache/jenkins/war/WEB-INF/lib/remoting-2.23.jar /var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-1.2.jar 35460
But what I found out from running mvn
, it generated the following Java line, and the "-X" was placed at the end, correctly.
/usr/java/jdk1.7.0_17/bin/java -cp /var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven3-agent-1.2.jar:/usr/share/apache-maven-3.0.5/boot/plexus-classworlds-2.4.jar org.jvnet.hudson.maven3.agent.Maven3Main /usr/share/apache-maven-3.0.5 /var/cache/jenkins/war/WEB-INF/lib/remoting-2.23.jar /var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-1.2.jar -X
Could you share an approach how I can fix this or it is a Jenkins bug?