Description of problem: user is stuck with clean package -Popenshift -DskipTests Version-Release number of selected component (if applicable): How reproducible: always Steps to Reproduce: 1. create and build any jboss app 2. try to customize maven opts 3. Actual results: you can't Expected results: you can Additional info:
Cannot modify MAVEN_OPTS/MAVEN_ARGS from existing action hooks so need to 1) add .openshift/action_hooks/pre_build_jbossas-7 2) Modify build.sh: if [ -f "${OPENSHIFT_REPO_DIR}/.openshift/action_hooks/pre_build_jbossas-7" ] then echo "Sourcing pre_build_jbossas-7" 1>&2 source ${OPENSHIFT_REPO_DIR}/.openshift/action_hooks/pre_build_jbossas-7 fi if [ -z "$MAVEN_OPTS" ]; then export MAVEN_OPTS="$OPENSHIFT_MAVEN_XMX" fi if [ -z "$MAVEN_ARGS" ]; then export MAVEN_ARGS="clean package -Popenshift -DskipTests" fi export PATH=$JAVA_HOME/bin:$M2_HOME/bin:$PATH pushd ${OPENSHIFT_REPO_DIR} > /dev/null if [ -n "$OPENSHIFT_MAVEN_MIRROR" ] then mvn --global-settings $OPENSHIFT_MAVEN_MIRROR --version mvn --global-settings $OPENSHIFT_MAVEN_MIRROR $MAVEN_ARGS else mvn --version mvn $MAVEN_ARGS fi
Verified on devenv_2445 Steps: 1. Create jbossas-7 application 2. In app's local repo, edit .openshift/action_hooks/pre_build_jbossas-7, set some values for MAVEN_OPTS/MAVEN_ARGS, eg: export MAVEN_OPTS="-Xmx512m" export MAVEN_ARGS="clean package -Popenshift -DskipTests --debug" 3. git push Result: During git push, MAVEN_OPTS/MAVEN_ARGS are sourced and works as expected.
In following comment #2 above, I am unable to see the MAVEN_OPTS being set to Xmx512m. During the build, it shows MAVEN_OPTS=-Xmx384m. To reproduce: I have created a jbossas-7 app, then created .openshift/action_hooks/pre_build_jbossas-7, and committed/pushed the changes: export MAVEN_OPTS="-Xmx512m" export MAVEN_ARGS="clean package -Popenshift -DskipTests --debug".