You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Rafal Krzewski <Ra...@caltha.pl> on 2003/05/28 11:33:16 UTC

maven-new tests failing

I tried to build maven-new and I got this:

    [junit] Running
org.apache.maven.artifact.factory.DefaultArtifactFactoryTest
maven.repo.local = ${maven.home}/repository
artifact factory : mavenRepoLocal = ${maven.home}/repository
artifact factory : mavenRepoLocal = ${maven.home}/repository
maven.repo.local = ${maven.home}/repository
artifact factory : mavenRepoLocal = ${maven.home}/repository
artifact factory : mavenRepoLocal = ${maven.home}/repository
maven.repo.local = ${maven.home}/repository
artifact factory : mavenRepoLocal = ${maven.home}/repository
artifact factory : mavenRepoLocal = ${maven.home}/repository
    [junit] Tests run: 3, Failures: 3, Errors: 0, Time elapsed: 1.447 sec
    [junit] [ERROR] TEST
org.apache.maven.artifact.factory.DefaultArtifactFactoryTest FAILED

The other tests in cli and core went OK. Is this supposed to fail ATM,
or did I step on a legitimate bug? I'd be happy to help if this
is something specific to my system (linux+jdk 1.4.1_01).

R.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: maven-new tests failing

Posted by Rafal Krzewski <Ra...@caltha.pl>.
Michal Maczka wrote:
> My repository path does not start with ${maven.home}...so this problem did
> not show up.
> 
> I have something like:
> 
> /repository
> /maven
> 
> It seems like interpolation problem.

I have a question: What is the proper way of building maven-new?
It is not self hosting AFAICT, therefore it needs live Maven-b10-dev to
be built, am I right?

This is my setup:
/usr/local/maven directory is writable to me, and MAVEN_HOME env var
is set up, pointing to that directory.
I go to projects/maven, bootstrap it, and then go to projects/maven-new
and run 'maven' (which runns Maven-b10-dev).

Is this the right way, or am I messing somehting up?

R.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


maven-new interpolation aspect

Posted by Paulo Silveira <pa...@paulo.com.br>.
Hello.

Jason and michal likes the idea of lazy interpolation, all done by the
aspect. So I ve added a new pointcut, to get around List
Project.getMavenRepoRemote().

    pointcut projectRepoteRepoGetter(Project p): call( List
Project.getMavenRepoRemote( .. ) )
                                        && target(p);

Then we interpolate _each_ remote repository string, creating a new
List. 

For maven.repo.local it gets more complicated, some classes do not
access it through project.getMavenRepoLocal(). Some classes even try
first to look it at System.getProperty(). You can take a look at
DefaultArtifactFactory as Jason said. Maybe another pointcut, but this
one would be to specific for the ArtifactFactory, I dont know if it is a
good idea. 

Take a look at the around code:

    List around(Project p): projectRepoteRepoGetter(p)
    {
        // Let's grab the value that would normally be returned.
        List remoteRepos = proceed(p);

        if ( remoteRepos == null )
        {
            return null;
        }
        
        // this one will be returned instead
        List interpolatedRemoteRepos = new ArrayList();
        
        // for each remote repository
        // interpolates it, and add to the new list
        for( Iterator i = remoteRepos.iterator(); i.hasNext(); ) 
        {
            String remoteRepo = (String) i.next();
            String interpolatedRepo = interpolate( remoteRepo, p );
            interpolatedRemoteRepos.add( interpolatedRepo );       
        }
        
        return interpolatedRemoteRepos;
    }


The interpolate method is an extract from what Jason wrote at first
time:

    private String interpolate(String s, Project project) {
        if ( s == null )
        {
            return null;
        }
        
        // Let's see if we need to do any value interpolation.
        if ( s.indexOf( "${pom" ) >= 0 )
        {
            // Find the method in the pom we're after, use reflection to
look
            // it up the method and execute it.
        }
        else if ( s.indexOf( "${" ) >= 0 )
        {
            return StringUtils.interpolate( s, project.getProperties()
);
        }

        return s;       
    }

(The patch is included)

thanks
------------------------
Paulo Silveira
http://www.paulo.com.br/
http://www.guj.com.br/
 

RE: maven-new tests failing

Posted by Jason van Zyl <ja...@zenplex.com>.
On Wed, 2003-05-28 at 08:54, Paulo Silveira wrote:
> > It is and I think Paulo even whipped up a patch for it. I 
> > explained to him how to fix it in IRC because I don't have 
> > time to fix it as I'm about to head off to boston. An 
> > absolute path will allow the tests to pass for now or you can 
> > fix the interpolation in ArtifactFactory::getMaveRepoLocal. I'm off.
> 
> I am sendig them again. One for mavenRepoLocal, we interpolate it before
> the factory creates
> all the artifacts.
> 
> The second one if for the mavenRemoteRepositories strings. same thing,
> but at the downloader.
> 
> give it a look. they make the tests run.

We should localize that interpolation and you should mention that on the
lists. Michal had a thought about localizing them. Anyway, I'm off to
Boston and will be away for a couple of days.

> Paulo
> 
> 
> > 
> > > Michal
> > > 
> > > > -----Original Message-----
> > > > From: Rafal Krzewski [mailto:Rafal.Krzewski@caltha.pl]
> > > > Sent: Wednesday, May 28, 2003 12:05 PM
> > > > To: Maven Developers List
> > > > Subject: Re: maven-new tests failing
> > > >
> > > >
> > > > Ben Walding wrote:
> > > > > This stuff is in so much flux that I'd expect tests to 
> > fail on a 
> > > > > regular basis.  That being said, attaching the output of test 
> > > > > results would be a good start. 
> > target/test-reports/whichever ones 
> > > > > failed
> > > >
> > > > Ha! Didn't know about that one... (I'm not using Junit in 
> > my project 
> > > > yet, tests are cool when you have them already :-()
> > > >
> > > > Here you go...
> > > >
> > > > R.
> > > >
> > > >
> > > 
> > > 
> > > 
> > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: dev-help@maven.apache.org
> > -- 
> > jvz.
> > 
> > Jason van Zyl
> > jason@zenplex.com
> > http://tambora.zenplex.org
> > 
> > In short, man creates for himself a new religion of a 
> > rational and technical order to justify his work and to be 
> > justified in it.
> >   
> >   -- Jacques Ellul, The Technological Society
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> > For additional commands, e-mail: dev-help@maven.apache.org
> > 
> > 
> > 
> 
> ______________________________________________________________________
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
-- 
jvz.

Jason van Zyl
jason@zenplex.com
http://tambora.zenplex.org

In short, man creates for himself a new religion of a rational
and technical order to justify his work and to be justified in it.
  
  -- Jacques Ellul, The Technological Society


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


RE: maven-new tests failing

Posted by Paulo Silveira <pa...@paulo.com.br>.
> It is and I think Paulo even whipped up a patch for it. I 
> explained to him how to fix it in IRC because I don't have 
> time to fix it as I'm about to head off to boston. An 
> absolute path will allow the tests to pass for now or you can 
> fix the interpolation in ArtifactFactory::getMaveRepoLocal. I'm off.

I am sendig them again. One for mavenRepoLocal, we interpolate it before
the factory creates
all the artifacts.

The second one if for the mavenRemoteRepositories strings. same thing,
but at the downloader.

give it a look. they make the tests run.

Paulo


> 
> > Michal
> > 
> > > -----Original Message-----
> > > From: Rafal Krzewski [mailto:Rafal.Krzewski@caltha.pl]
> > > Sent: Wednesday, May 28, 2003 12:05 PM
> > > To: Maven Developers List
> > > Subject: Re: maven-new tests failing
> > >
> > >
> > > Ben Walding wrote:
> > > > This stuff is in so much flux that I'd expect tests to 
> fail on a 
> > > > regular basis.  That being said, attaching the output of test 
> > > > results would be a good start. 
> target/test-reports/whichever ones 
> > > > failed
> > >
> > > Ha! Didn't know about that one... (I'm not using Junit in 
> my project 
> > > yet, tests are cool when you have them already :-()
> > >
> > > Here you go...
> > >
> > > R.
> > >
> > >
> > 
> > 
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> > For additional commands, e-mail: dev-help@maven.apache.org
> -- 
> jvz.
> 
> Jason van Zyl
> jason@zenplex.com
> http://tambora.zenplex.org
> 
> In short, man creates for himself a new religion of a 
> rational and technical order to justify his work and to be 
> justified in it.
>   
>   -- Jacques Ellul, The Technological Society
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
> 
> 
> 

RE: maven-new tests failing

Posted by Jason van Zyl <ja...@zenplex.com>.
On Wed, 2003-05-28 at 06:24, Michal Maczka wrote:
> My repository path does not start with ${maven.home}...so this problem did
> not show up.
> 
> I have something like:
> 
> /repository
> /maven
> 
> It seems like interpolation problem.

It is and I think Paulo even whipped up a patch for it. I explained to
him how to fix it in IRC because I don't have time to fix it as I'm
about to head off to boston. An absolute path will allow the tests to
pass for now or you can fix the interpolation in
ArtifactFactory::getMaveRepoLocal. I'm off.

> Michal
> 
> > -----Original Message-----
> > From: Rafal Krzewski [mailto:Rafal.Krzewski@caltha.pl]
> > Sent: Wednesday, May 28, 2003 12:05 PM
> > To: Maven Developers List
> > Subject: Re: maven-new tests failing
> >
> >
> > Ben Walding wrote:
> > > This stuff is in so much flux that I'd expect tests to fail on a regular
> > > basis.  That being said, attaching the output of test results would be a
> > > good start.
> > > target/test-reports/whichever ones failed
> >
> > Ha! Didn't know about that one... (I'm not using Junit in my project
> > yet, tests are cool when you have them already :-()
> >
> > Here you go...
> >
> > R.
> >
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
-- 
jvz.

Jason van Zyl
jason@zenplex.com
http://tambora.zenplex.org

In short, man creates for himself a new religion of a rational
and technical order to justify his work and to be justified in it.
  
  -- Jacques Ellul, The Technological Society


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


RE: maven-new tests failing

Posted by Michal Maczka <mi...@cqs.ch>.
My repository path does not start with ${maven.home}...so this problem did
not show up.

I have something like:

/repository
/maven

It seems like interpolation problem.

Michal

> -----Original Message-----
> From: Rafal Krzewski [mailto:Rafal.Krzewski@caltha.pl]
> Sent: Wednesday, May 28, 2003 12:05 PM
> To: Maven Developers List
> Subject: Re: maven-new tests failing
>
>
> Ben Walding wrote:
> > This stuff is in so much flux that I'd expect tests to fail on a regular
> > basis.  That being said, attaching the output of test results would be a
> > good start.
> > target/test-reports/whichever ones failed
>
> Ha! Didn't know about that one... (I'm not using Junit in my project
> yet, tests are cool when you have them already :-()
>
> Here you go...
>
> R.
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: maven-new tests failing

Posted by Rafal Krzewski <Ra...@caltha.pl>.
Ben Walding wrote:
> This stuff is in so much flux that I'd expect tests to fail on a regular
> basis.  That being said, attaching the output of test results would be a
> good start.
> target/test-reports/whichever ones failed

Ha! Didn't know about that one... (I'm not using Junit in my project
yet, tests are cool when you have them already :-()

Here you go...

R.

Re: maven-new tests failing

Posted by Ben Walding <de...@walding.com>.
This stuff is in so much flux that I'd expect tests to fail on a regular 
basis.  That being said, attaching the output of test results would be a 
good start.
target/test-reports/whichever ones failed

Rafal Krzewski wrote:

>I tried to build maven-new and I got this:
>
>    [junit] Running
>org.apache.maven.artifact.factory.DefaultArtifactFactoryTest
>maven.repo.local = ${maven.home}/repository
>artifact factory : mavenRepoLocal = ${maven.home}/repository
>artifact factory : mavenRepoLocal = ${maven.home}/repository
>maven.repo.local = ${maven.home}/repository
>artifact factory : mavenRepoLocal = ${maven.home}/repository
>artifact factory : mavenRepoLocal = ${maven.home}/repository
>maven.repo.local = ${maven.home}/repository
>artifact factory : mavenRepoLocal = ${maven.home}/repository
>artifact factory : mavenRepoLocal = ${maven.home}/repository
>    [junit] Tests run: 3, Failures: 3, Errors: 0, Time elapsed: 1.447 sec
>    [junit] [ERROR] TEST
>org.apache.maven.artifact.factory.DefaultArtifactFactoryTest FAILED
>
>The other tests in cli and core went OK. Is this supposed to fail ATM,
>or did I step on a legitimate bug? I'd be happy to help if this
>is something specific to my system (linux+jdk 1.4.1_01).
>
>R.
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>For additional commands, e-mail: dev-help@maven.apache.org
>
>
>  
>



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org