Bug 1033146 - Not able to override $MAVEN_ARGS values in JBoss EWS cartridge
Not able to override $MAVEN_ARGS values in JBoss EWS cartridge
Product: OpenShift Container Platform
Classification: Red Hat
Component: Image (Show other bugs)
All All
medium Severity medium
: ---
: ---
Assigned To: Brenton Leanhardt
libra bugs
Depends On: 1033144
  Show dependency treegraph
Reported: 2013-11-21 10:44 EST by Nikhil Mone
Modified: 2017-03-08 12 EST (History)
6 users (show)

See Also:
Fixed In Version: openshift-origin-cartridge-jbossews-
Doc Type: Bug Fix
Doc Text:
The MAVEN_ARGS environment variable could not be set with JBoss EWS cartridges because it would reset to the default value of the cartridge when application changes were pushed. This fix updates the build script for the JBoss EWS cartridge so that the default value of the cartridge is only used if MAVEN_ARGS is not defined. If it is defined, the user configuration is used.
Story Points: ---
Clone Of: 1033144
Last Closed: 2014-01-28 11:39:02 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Nikhil Mone 2013-11-21 10:44:28 EST
+++ This bug was initially created as a clone of Bug #1033144 +++

Description of problem: Not able to override $MAVEN_ARGS values in JBoss EWS cartridge. See below :

[1] https://github.com/openshift/origin-server/blob/master/cartridges/openshift-origin-cartridge-jbossews/bin/build

One needs to modify  :

export MAVEN_ARGS="clean package -Popenshift -DskipTests"


if [ -z "$MAVEN_ARGS" ]; then
   export MAVEN_ARGS="clean package -Popenshift -DskipTests"

Similar to JBoss EAP cartridge

Version-Release number of selected component (if applicable):

How reproducible:
Every time

Steps to Reproduce:
1. Create a JBoss EWS application
2. create an action hook to override $MAVEN_ARGS
3. git add > commit > push the application, you will see variable is not overridden. 

Actual results:

$MAVEN_ARGS value stays to default : "clean package -Popenshift -DskipTests"

Expected results:

Should be overridden with the values provided in action hook

Additional info:
Comment 3 Brenton Leanhardt 2014-01-14 09:44:44 EST

commit be5a392a0a4a17dc335f4a7dc57f01c579d56fb2
Author: Dan Mace <ironcladlou@gmail.com>
Date:   Fri Nov 22 10:00:32 2013 -0500

    Bug 1033144: Allow MAVEN_ARGS overriding in jbossews builds

PR: https://github.com/openshift/enterprise-server/pull/195
Comment 5 Gaoyun Pei 2014-01-15 03:16:47 EST
Verify this bug with package  openshift-origin-cartridge-jbossews-

1. Create a jbossews-2.0 app
2. Set a custom env value to $MAVEN_ARGS
[root@broker app]# rhc env-set -a app -e MAVEN_ARGS="post-integration-test"
Password: ******
Setting environment variable(s) ... done
3. Check the env variable after build process
[root@broker app]# date > b
[root@broker app]# git add . && git commit -amp && git push
[root@broker app]# rhc ssh app --gear 'env|grep MAVEN_ARGS'
Password: ******
=== 52d616edea28b95392000ad6 jbossews-2.0
Comment 7 errata-xmlrpc 2014-01-28 11:39:02 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.