JAVA S2I - Configuration Environment Variables - MAVEN_ARGS missing documentation

Latest response

To be it seems the documentation found at https://access.redhat.com/documentation/en-us/red_hat_jboss_middleware_for_openshift/3/html-single/red_hat_java_s2i_for_openshift/index regarding the paramater MAVEN_ARGS is incomplete.

It states that the default is

-e -Popenshift -DskipTests -Dcom.redhat.xpaas.repo.redhatga -Dfabric8.skip=true package

But no matter what value i choose the following arguments are always appended as well.

--batch-mode -Djava.net.preferIPv4Stack=true -s /tmp/artifacts/configuration/settings.xml -Dmaven.repo.local=/tmp/artifacts/m2  package

So if set MAVEN_ARGS='test package' the result is: (Notice the duplicated 'package' steps)

INFO Running 'mvn test package --batch-mode -Djava.net.preferIPv4Stack=true -s /tmp/artifacts/configuration/settings.xml -Dmaven.repo.local=/tmp/artifacts/m2  package'

According to the documentation the MAVEN_ARGS_APPEND configuration environment variable is used for appending but to be it seems that is basically what MAVEN_ARGS is doing.

Is this a deficiency in the documentation or am I misunderstanding something?

Responses

I've noticed the same when trying to change the settings.xml , have you found a way to replace the MAVEN_ARGS instead of appending ?

Nope, at the moment it's not critical for us so I've settled with documenting this strange behavior in our internal wiki space for now.