I have figured out the way to use {env.CODE_BASE} but for that each user will 
have to change their settings.xml. 

Is there a way, I can define localRepository in project pom file instead of 
settings.xml so that user does not have to define environment variable and edit 
their settings.xml.

Thanks,  
 


--- On Sat, 5/21/11, Petr V. <[email protected]> wrote:

From: Petr V. <[email protected]>
Subject: How to define local repository path in settings.xml or pom.xml?
To: "Maven Users List" <[email protected]>
Date: Saturday, May 21, 2011, 2:26 AM

I am trying to define local repository path in settings.xml on Windows.

I have a windows environment variable CODE_BASE=C:\mycode

In settings.xml , I put

<localRepository>${env.CODE_BASE}\build\local_depot</localRepository>

But it does not read environment variable. How can I read environment variable 
in settings.xml.

If that's not a possibility, can I define local repository in pom.xml of 
project?

Your help will be much appreciated.

Thanks,





Reply via email to