[release plugin] what maven executable/configuration is used by the maven commands?
I have a question regarding maven commands of the release plugin (maven-install, maven-deploy, ...). Which maven executable is eventually used to execute the maven commands? Does it come from a dependency library, is the executable used that is visible on the PATH env var, is the M2_HOME/MVN_HOME env var respected?
The reason I'm asking is that we have a contineous integration server that has different maven installations with different settings.xml files. This works fine if we use a pure maven build tasks, because we can specify the maven installation to be used. However, if we use maven implicitly from within a Grails command, like the ones provided by the release plugin, we don't know which maven installation is used and how we can specify a configuration. We are using custom repositories that maven needs to be aware of to resolve the dependencies and to publish our Grails plugins.
We could use a global maven configuration (~/.m2/settings.xml), but that would also affect all other maven installations, which need to have their custom settings configured. So knowing which maven executable is used by the release plugin would already take us a step further. The next thing would be how to tell this maven executable which confiuration to use...