openshift-cartridges/openshift-wildfly-cartridge — pull request #13 by emag (2014-05-18 10:17:43+00:00)
Title: Adding settings.base.xml

I got the following error when I push my code.

~~~
[ERROR] Error executing Maven.
[ERROR] The specified global settings file does not exist: /var/lib/openshift/53763860302ca02b0d000001/wildfly/standalone/configuration/settings.base.xml
~~~

If `$OPENSHIFT_GEAR_DNS` is not set `rhcloud.com` domain, `mvn` is executed with settings.base.xml.

~~~ sh:bin/control
function build() {
CONFIG_DIR="${OPENSHIFT_WILDFLY_DIR}/standalone/configuration"
OPENSHIFT_MAVEN_MIRROR="${CONFIG_DIR}/settings.base.xml"
if [[ $OPENSHIFT_GEAR_DNS =~ .*\.rhcloud\.com$ ]]
then
OPENSHIFT_MAVEN_MIRROR="${CONFIG_DIR}/settings.rhcloud.xml"
fi
[...]
if [ -n "$OPENSHIFT_MAVEN_MIRROR" ]
then
mvn --global-settings $OPENSHIFT_MAVEN_MIRROR --version
mvn --global-settings $OPENSHIFT_MAVEN_MIRROR $MAVEN_ARGS
[...]
~~~