Hide Forgot
Description of problem: A user is not able to change the default value of MAVEN_OPTS, for example, from MAVEN_OPTS=-Xmx384m to MAVEN_OPTS=-Xmx512m Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1. Create a jbossas-7 app 2. Create .openshift/action_hooks/pre_build_jbossas-7 3. In this file, add export MAVEN_OPTS="-Xmx512m" export MAVEN_ARGS="clean package -Popenshift -DskipTests --debug" 4. git commit/push the changes Actual results: The env output shows MAVEN_OPTS=-Xmx384m Expected results: The env output should show MAVEN_OPTS=-Xmx512m Additional info: This could be related to: https://bugzilla.redhat.com/show_bug.cgi?id=868053
PR: https://github.com/openshift/origin-server/pull/4486
Commit pushed to master at https://github.com/openshift/origin-server https://github.com/openshift/origin-server/commit/c886c189aa70a40a587bd4734eb2e8cf0b7eda31 Bug 1033673 - Unable to customize MAVEN_OPTS
Checked on devenv_4236, the issue is reproduced, please refer to the following results: 1. Create a jbossas-7 app rhc app create cas00 jbossas-7 2. Create .openshift/action_hooks/pre_build_jbossas-7 3. In this file, add export MAVEN_OPTS="-Xmx512m" export MAVEN_ARGS="clean package -Popenshift -DskipTests --debug" 4. git commit/push the changes 5. Check the value of MAVEN_OPTS variable ]$ rhc ssh cas00 'env | grep MAVEN' SSH_ORIGINAL_COMMAND=env | grep MAVEN
The behavior is not supposed to permanently alter the environment variable of the gear, it is only supposed to alter the arguments passed to the maven invocation during the build, so you need to watch the output of the maven command during the build process to see that the -Xmx argument is correct: remote: [DEBUG] properties used {java.vendor=Oracle Corporation, sun.java.launch <output trimmed> env.MAVEN_OPTS=-Xmx512m
Just tested this against devenv_4236 (ami-b5f0c3dc), and the fix in Comment 1 works for this devenv.