You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by Alexis Agahi <al...@users.sf.net> on 2003/10/18 23:44:20 UTC
Merlin / Maven / problem with AbstractMerlinTestCase
Hi,
I've a little problem compiling last merlin cvs head version (on Linux OS)
When looking at
org.apache.avalon.merlin.unit.AbstractMerlinTestCase
the MAVEN repository folder is set using (in order of success)
final String system = System.getProperty( "maven.home.local" );
return new File( new File( system ), "repository" );
final String home = System.getProperty( "maven.home" );
return new File( new File( home ), "repository" );
File user = new File( System.getProperty( "user.dir" ) );
return new File( new File( user ), "repository" );
In fact, I havent set my "maven.home.local" env, so it gets the 2nd choice:
$MAVEN_HOME/repository
BUT, the problem is that my maven repository folder is set to
$HOME/.maven/
and not in $MAVEN_HOME/repository
The question is:
is it my maven reposity location that is uncorrect?
or the AbstractMerlinTestCase assumption that is uncorrect?
should it be ?
final String home = System.getProperty( "user.home" );
return new File( new File( home, ".maven" ), "repository" );
(but does this work with windows arch?)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org
Re: Merlin / Maven / problem with AbstractMerlinTestCase
Posted by Stephen McConnell <mc...@apache.org>.
Stephen McConnell wrote:
>
> This impacts both the AbstractMerlinTestCase, the Maven Plugin
> and the merlin scripts/bat files.
I've just checked the bat scripts and plugin. It turns out that both are
ok. Problem was limited to the new abstract test case.
Cheers, Steve.
--
Stephen J. McConnell
mailto:mcconnell@apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org
Re: Merlin / Maven / problem with AbstractMerlinTestCase
Posted by Stephen McConnell <mc...@apache.org>.
Stephen McConnell wrote:
>
> This sounds like the original assumptions I made about the Maven
> repository location are incorrect. Based on your results it seems
> that repository resolutions should be (excluding error checks):
>
> final String local = System.getProperty( "maven.home.local" );
> if( local != null )
> {
> return new File( local, "repository" );
> }
> else
> {
> File home = new File( System.getProperty( "user.dir" ) );
> File maven = new File( home, ".maven" );
> return new File( maven, "repository" );
> }
>
> This impacts both the AbstractMerlinTestCase, the Maven Plugin
> and the merlin scripts/bat files. I'll update the TestCase and
> verify that things work on NT.
Have just updated AbstractMerlinTestCase in CVS and verified this on NT
- everything is working fine.
Steve.
> Could you take a look at the
> launch scripts (merlin.sh/merlin.bat)? I have a hunch there
> could be changes to be made there as well.
>
> Cheers, Steve.
>
>
> Alexis Agahi wrote:
>
>> Hi,
>>
>> I've a little problem compiling last merlin cvs head version (on
>> Linux OS)
>>
>> When looking at org.apache.avalon.merlin.unit.AbstractMerlinTestCase
>>
>> the MAVEN repository folder is set using (in order of success)
>>
>> final String system = System.getProperty( "maven.home.local" );
>> return new File( new File( system ), "repository" );
>>
>> final String home = System.getProperty( "maven.home" );
>> return new File( new File( home ), "repository" );
>>
>> File user = new File( System.getProperty( "user.dir" ) );
>> return new File( new File( user ), "repository" );
>>
>>
>> In fact, I havent set my "maven.home.local" env, so it gets the 2nd
>> choice:
>> $MAVEN_HOME/repository
>>
>> BUT, the problem is that my maven repository folder is set to
>> $HOME/.maven/
>> and not in $MAVEN_HOME/repository
>>
>>
>> The question is:
>> is it my maven reposity location that is uncorrect?
>> or the AbstractMerlinTestCase assumption that is uncorrect?
>>
>> should it be ?
>> final String home = System.getProperty( "user.home" );
>> return new File( new File( home, ".maven" ), "repository" );
>> (but does this work with windows arch?)
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
>> For additional commands, e-mail: dev-help@avalon.apache.org
>>
>>
>>
>>
>
--
Stephen J. McConnell
mailto:mcconnell@apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org
Re: Merlin / Maven / problem with AbstractMerlinTestCase
Posted by Stephen McConnell <mc...@apache.org>.
This sounds like the original assumptions I made about the Maven
repository location are incorrect. Based on your results it seems
that repository resolutions should be (excluding error checks):
final String local = System.getProperty( "maven.home.local" );
if( local != null )
{
return new File( local, "repository" );
}
else
{
File home = new File( System.getProperty( "user.dir" ) );
File maven = new File( home, ".maven" );
return new File( maven, "repository" );
}
This impacts both the AbstractMerlinTestCase, the Maven Plugin
and the merlin scripts/bat files. I'll update the TestCase and
verify that things work on NT. Could you take a look at the
launch scripts (merlin.sh/merlin.bat)? I have a hunch there
could be changes to be made there as well.
Cheers, Steve.
Alexis Agahi wrote:
>Hi,
>
>I've a little problem compiling last merlin cvs head version (on Linux OS)
>
>When looking at
>org.apache.avalon.merlin.unit.AbstractMerlinTestCase
>
>the MAVEN repository folder is set using (in order of success)
>
>final String system = System.getProperty( "maven.home.local" );
>return new File( new File( system ), "repository" );
>
>final String home = System.getProperty( "maven.home" );
>return new File( new File( home ), "repository" );
>
>File user = new File( System.getProperty( "user.dir" ) );
>return new File( new File( user ), "repository" );
>
>
>In fact, I havent set my "maven.home.local" env, so it gets the 2nd choice:
>$MAVEN_HOME/repository
>
>BUT, the problem is that my maven repository folder is set to
>$HOME/.maven/
>and not in $MAVEN_HOME/repository
>
>
>The question is:
>is it my maven reposity location that is uncorrect?
>or the AbstractMerlinTestCase assumption that is uncorrect?
>
>should it be ?
>final String home = System.getProperty( "user.home" );
>return new File( new File( home, ".maven" ), "repository" );
>(but does this work with windows arch?)
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
>For additional commands, e-mail: dev-help@avalon.apache.org
>
>
>
>
--
Stephen J. McConnell
mailto:mcconnell@apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org