Maven 3.3.1 introduces a ${maven.projectBaseDir}/.mvn/maven.config file
where I can specify common command line options. How do I use variables in
that ? Specifically if I'm trying to set the settings file to be something
like ${maven.projectBaseDir}/settings.xml, how would I set that in
maven.config ?
Currently I pass a -s${Bamboo.WorkingDir}/settings.xml option to the as
part of the automated builds. When I run the builds manually on my laptop
I have to pass something like
-s${HOME}/path/to/project/root/dir/settings.xml. And if I'm trying run it
manually on the build system, I had to pass something like
-s/path/to/Bamboo/build/working/dir/settings.xml.
Using maven.config would help tremendously, but it does not seem to
understand ${maven.projectBaseDir}.
I have a maven.config that contains the following:
-B -V -s ${maven.projectBaseDir}/settings.xml
I get the following error when I try to build:
bash% cd ${HOME}/source-repos/ProjectA
bash% mvn clean install
[ERROR] The specified user settings file does not exist:
/home/mehul/source-repos/ProjectA/${maven.projectBaseDir}/settings.xml
Shouldn't Maven substitute the value of the ${maven.projectBaseDir}
variable ?
cheers,
mehul
--
Mehul N. Sanghvi
email: mehul.sang...@gmail.com