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).
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?
Paul
-----Original Message-----
From: Stephen McConnell [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 10, 2003 10:24 PM
To: Maven Users List
Subject: Re: MAVEN_HOME and MAVEN_HOME_LOCAL
Jason van Zyl wrote:
>On Wed, 2003-12-10 at 10:34, Stephen McConnell wrote:
>
>
>>Product: Maven 1.0-rc1
>>
>>MAVEN_HOME = /java/maven
>>MAVEN_HOME_LOCAL = <not set>
>>
>>During a build, it seems that Maven will ignore MAVEN_HOME when it copies
the
>>result to the repository cache. Instead it copies to ${user.home}/.maven
>>
>>
>
>First off, what are you trying to do exactly. I don't understand the
>sentence above.
>
When Nicols' invokes jar:install the resulting artifact is placed by
maven in the repository under ${user.home}/.maven. A unit test
associated with the build is pulling in resources from that repository -
but the code pulling is the resoruces is assuming that the repository is
a %MAVEN_HOME%/repository. What we need to confirm is the logic
resolution of the user's local repository based only on the availability
of the MAVEN_HOME and MAVEN_HOME_LOCAL environment variables.
Current assumptions are something like the following;
private static String getMavenHome()
{
String local =
System.getProperty(
"maven.home.local",
Env.getEnvVariable( "MAVEN_HOME_LOCAL" ) );
if( null != local ) return local;
String maven =
System.getProperty(
"maven.home",
Env.getEnvVariable( "MAVEN_HOME" ) );
if( null != maven ) return maven;
return System.getProperty( "user.home" ) + File.separator +
".maven";
}
However, Nocols' case suggests either the above assumptions are
incorrect or something strage is happening in maven.
>Are you talking about a jar:install type operation here?
>
Yes.
Stephen.
>
>
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]