Thanks Brian for your reply. Our developers work on several projects at same time using same machine. What we want is that when they build the particular project then every thing related to project goes to its own build directory (lot of output other than jars) instead of putting every thing in central m2 location.
We can issue command mvn install -Dmaven.repo.local="c:\project1\build\depot" for project 1 to push all its dependencies in path specified but we want to automate it via pom file so developers does not have to pass this option to build project. Thanks, --- On Sat, 5/21/11, Brian Topping <[email protected]> wrote: From: Brian Topping <[email protected]> Subject: Re: How to define local repository path in settings.xml or pom.xml? To: "Maven Users List" <[email protected]> Date: Saturday, May 21, 2011, 4:51 AM Can you describe more about what you are specifically trying to accomplish? Maybe the list can help better that way. In general, the location of the repository should not matter. One of the beautiful things about Maven is it manages the location per machine automatically. There's no need to put it in the same place for all developers, which breaks for Windows v. *nix. And your builds plugins should not require a fixed location for the repository, rather, it should be resolved from the context sent by Maven itself. On May 20, 2011, at 4:35 PM, Petr V. wrote: > 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, > > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
