Glenn, Paul wrote:

Hi,

From what I understand, the location of the user's
repository no longer has anything to do with the
value of MAVEN_HOME (it's where the 'binaries'
are installed).


Yep - makes sense.



The repository is (by default) relative to the new MAVEN_HOME_LOCAL (${MAVEN_HOME_LOCAL}/repository). I think this can be overridden with the user's build.properties (or other overrides), by setting maven.repo.local to a value.

If MAVEN_HOME_LOCAL isn't set, it defaults
to '${HOME}/.maven'.

So putting it all together, if you don't set
anything, you get ${HOME}/.maven/repository
as the location of the repo.

I think what you really want to do is use
the value of maven.repo.local, rather than
derive it yourself. Is this outside of a plugin?


Yes. Can't assume the system property - but that's ok - based on what your saying and my own digging the following logic should work fine:


private static String getMavenRoot()
{
String local =
System.getProperty(
"maven.home.local",
Env.getEnvVariable( "MAVEN_HOME_LOCAL" ) );
if( null != local ) return local;
return System.getProperty( "user.home" ) + File.separator + ".maven";
}


Thanks for the feedback!

Cheers, Steve.


--


Stephen J. McConnell
mailto:[EMAIL PROTECTED]

|------------------------------------------------|
| Magic by Merlin                                |
| Production by Avalon                           |
|                                                |
| http://avalon.apache.org/merlin                |
| http://dpml.net/                               |
|------------------------------------------------|





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to