maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason van Zyl <ja...@takari.io>
Subject Re: maven.config file and variable substitution
Date Tue, 15 Sep 2015 12:26:07 GMT
There is currently no variable interpolation accepted as this is all handled in the shell scripts.
What you’re asking for is reasonable so I ask you create an issue in JIRA with your use
case. I think it’s a good one.

> On Sep 13, 2015, at 2:59 PM, Mehul Sanghvi <mehul.sanghvi@gmail.com> wrote:
> 
> 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.sanghvi@gmail.com

Thanks,

Jason

----------------------------------------------------------
Jason van Zyl
Founder, Takari and Apache Maven
http://twitter.com/jvanzyl
http://twitter.com/takari_io
---------------------------------------------------------

A language that doesn’t affect the way you think about programming is not worth knowing.

 
 -- Alan Perlis













---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message