What I want is to instruct the Maven plugin in Jenkins to build my project
with JDK 1.6, but it seems that the Maven plugins complains the mismatch of
the JDK version. Here is the console output:
-----
Parsing POMs
Modules changed, recalculating dependency graph
Established TCP socket on 6939
[managerpom] $ "C:\Program Files\Java\jdk1.6.0_45/bin/java" -Xmx2048m
-Xms1024m -XX:PermSize=256M -XX:MaxNewSize=256m -XX:MaxPermSize=512m -cp
"C:\Program Files
(x86)\Jenkins\plugins\maven-plugin\WEB-INF\lib\maven32-agent-1.7.jar;C:\Program
Files\apache-maven-3.2.5\boot\plexus-classworlds-2.5.2.jar;C:\Program
Files\apache-maven-3.2.5/conf/logging" jenkins.maven3.agent.Maven32Main
"C:\Program Files\apache-maven-3.2.5" "C:\Program Files
(x86)\Jenkins\war\WEB-INF\lib\remoting-2.52.jar" "C:\Program Files
(x86)\Jenkins\plugins\maven-plugin\WEB-INF\lib\maven32-interceptor-1.7.jar"
"C:\Program Files
(x86)\Jenkins\plugins\maven-plugin\WEB-INF\lib\maven3-interceptor-commons-1.7.jar"
6939
<===[JENKINS REMOTING CAPACITY]===>channel started
ERROR: [JENKINS-18403] JDK 5 not supported to run Maven; retrying with slave
Java and setting compile/test properties to point to C:\Program
Files\Java\jdk1.6.0_45
Established TCP socket on 6941
[managerpom] $ "C:\Program Files (x86)\Jenkins\jre/bin/java" -Xmx2048m
-Xms1024m -XX:PermSize=256M -XX:MaxNewSize=256m -XX:MaxPermSize=512m -cp
"C:\Program Files
(x86)\Jenkins\plugins\maven-plugin\WEB-INF\lib\maven32-agent-1.7.jar;C:\Program
Files\apache-maven-3.2.5\boot\plexus-classworlds-2.5.2.jar;C:\Program
Files\apache-maven-3.2.5/conf/logging" jenkins.maven3.agent.Maven32Main
"C:\Program Files\apache-maven-3.2.5" "C:\Program Files
(x86)\Jenkins\war\WEB-INF\lib\remoting-2.52.jar" "C:\Program Files
(x86)\Jenkins\plugins\maven-plugin\WEB-INF\lib\maven32-interceptor-1.7.jar"
"C:\Program Files
(x86)\Jenkins\plugins\maven-plugin\WEB-INF\lib\maven3-interceptor-commons-1.7.jar"
6941
Error occurred during initialization of VM
Could not reserve enough space for object heap
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
-----
My environment:
-----
OS: Windows Server 2008 R2 (64bit)
Jenkins version: 1.628
Maven plugin version: v2.12
JDK configuration in Jenkins:
1. jdk1.7.0_67 -> C:\Program Files\Java\jdk1.7.0_67
2. jdk1.6.0_45 -> C:\Program Files\Java\jdk1.6.0_45
Maven configration in Jenkins:
1. Maven-3.2.5 -> C:\Program Files\apache-maven-3.2.5
2. Maven-3.3.3 -> C:\Program Files\apache-maven-3.3.3
OS environment variable %JAVA_HOME%: C:\Program Files\Java\jdk1.7.0_67
OS environment variable %M2_HOME%: C:\Program Files\apache-maven-3.2.5
-----
The configration of this Jenkins project:
JDK ==> jdk1.6.0_45
Build | Maven Version ==> Maven-3.2.5
Build | Goals and options ==> install -Dmaven.test.skip=true --batch-mode
--fail-fast
--
View this message in context:
http://jenkins-ci.361315.n4.nabble.com/Failed-to-instruct-Maven-plugin-2-12-to-compile-my-project-using-JDK-1-6-tp4775733.html
Sent from the Jenkins users mailing list archive at Nabble.com.