Hi Brett,

1. I followed most recent discussions and could only find MNG-1378
as being close to this, but not the same.

2. Yes, this can be fixed by the user by specifying a direct
dependency in the pom of artifact A on artifact D, so that could
be used as a workaround.

3. I guess maven follows all paths through dependencies from 
artifact A through artifact D and finds it is both dependent
on D for scope "test" and "compile". Should it then not select
"compile" as it has (or should have) a higher "status" ? 

4. The current "undeterministic" behaviour of maven is not
something I would only fix in 2.1 but rather in 2.0.1.
This "diamond" dependency pattern is going to show up sooner
or later in other projects, and if running maven and 
succeeding with it starts to depend on the time of the day...

5. Should I file a bug report ?

Regards
Mark Donszelmann

> -----Original Message-----
> From: Brett Porter [mailto:[EMAIL PROTECTED] 
> Sent: Sunday, October 30, 2005 9:44 PM
> To: Maven Users List
> Subject: Re: Dependency gets selected for test rather than compile
> 
> I seem to recall discussing this recently, I think the 
> behaviour is currently undefined. We will improve this in 2.1 
> with better conflict resolvers, but you can always force a 
> version and/or scope in your current pom.
> 
> - Brett
> 
> On 10/27/05, Donszelmann, Mark <[EMAIL PROTECTED]> wrote:
> > Hi
> >
> > I see the following problem in Maven 2.0:
> >
> > I have a artifact A, which depends compile scope on B, and 
> test scope on C.
> > B and C depend compile scope on D.
> >
> > When I run mvn one of the following cases happens:
> >
> > 1.
> >
> > A gets selected for compile
> > B gets selected for compile
> > D gets selected for compile
> > C gets selected for test
> >
> > compilation succeeds.
> >
> > 2.
> >
> > A gets selected for test
> > B gets selected for test
> > D gets selected for test
> > C gets selected for test
> >
> > followed by
> >
> > A gets selected for compile
> > B gets selected for compile
> > (but D does not get selected for compile)
> >
> > compilation fails on any reference to classes from artifact D.
> >
> >
> > Maven chooses case 1 or 2 depending on the time of the day...
> > I have around 10 artifacts of this case in a multi-module 
> and always 
> > one or two do not compile, and not always the same.
> >
> > Anybody seen this, is this a known problem.
> >
> > Regards
> > Mark Donszelmann
> >
> >
> > 
> ---------------------------------------------------------------------
> > 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]
> 
> 

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

Reply via email to