Details
-
Improvement
-
Status: Resolved (View Workflow)
-
Major
-
Resolution: Not A Defect
-
None
-
Platform: All, OS: All
Description
We have maven jobs that require specific MAVEN_OPTS to be able to complete
successfully.
One example is to be able to specify the -Xmx parameter to the JVM to workaround
memory problems in the artifact deployer (which apparently pulls the whole
artifact in memory to upload it, a problem for large artifacts).
The configuration page for maven2 projects in Hudson lets you specify the
MAVEN_OPTS to use in the Advanced Build options.
One way to support support these in the m2release plugin would be to
automatically use whatever MAVEN_OPTS are specified for the job in the Advanced
Build option, if any.
Another way would be to allow us to specify the MAVEN_OPTS to use for m2release
somewhere in the configuration, either globally or per-project.
Thanks!
I am getting the same error.
I have set the MAVEN_OPTS to the build environment section of the job via EnvInject but it is not passed to the maven release.
The m2/3 type job does clean deploy with "-Xms512m –Xmx2048m” MAVEN_OPTS.
I am setting the MAVEN_OPTS again in Build Environment -> Inject environment variables to the build process” : MAVEN_OPTS='-Xms512m -Xmx2048m -XX:PermSize=256m -XX:MaxPermSize=512m’
However the maven release is still failing with OOM PermGen.
I see this in the console:
At revision 154784
[EnvInject] - Executing scripts and injecting environment variables after the SCM step.
[EnvInject] - Injecting as environment variables the properties content
MAVEN_OPTS='-Xms512m -Xmx2048m -XX:PermSize=256m -XX:MaxPermSize=512m’
…
[checkout] $ /users/px-build/commonTools/java/jdk1.7.0_67/LNX-64/bin/java -Xms512m -Xmx2048m -cp /scratch/jenkins_slave_sjc-bld62-lnx/maven3-agent.jar:/users/px-build/commonTools/maven/sjc-hudson62-lnx/apache-maven-3.0.4/boot/plexus-classworlds-2.4.jar org.jvnet.hudson.maven3.agent.Maven3Main /users/px-build/commonTools/maven/sjc-hudson62-lnx/apache-maven-3.0.4 /scratch/jenkins_slave_sjc-bld62-lnx/slave.jar /scratch/jenkins_slave_sjc-bld62-lnx/maven3-interceptor.jar /scratch/jenkins_slave_sjc-bld62-lnx/maven3-interceptor-commons.jar 38360
…
Executing Maven: -B -f /scratch/jenkins_slave_sjc-bld62-lnx/workspace/comp-ps_cluster_parent-PI_3_0_NIHAU/checkout/pom.xml -Dmaven.repo.local=/scratch/jenkins_slave_sjc-bld62-lnx/workspace/comp-ps_cluster_parent-PI_3_0_NIHAU/.repository -DdevelopmentVersion=3.0.29-SNAPSHOT -DreleaseVersion=3.0.28 -e -B -Prelease-profile -DgenerateReleasePoms=true release:prepare release:perform -Dresume=false -s /users/px-build/commonTools/maven/sjc-hudson62-lnx/apache-maven-3.0.4/conf/settings-rel.xml -Dmaven.test.skip=true
…
-Indra