maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jörg Schaible <Joerg.Schai...@Elsag-Solutions.com>
Subject RE: How Does Maven Handle This?
Date Mon, 19 Mar 2007 08:04:44 GMT
Hi Ian,

Dees, Ian (GE Healthcare) wrote on Friday, March 16, 2007 7:14 PM:

> If I have a dependency tree similar to this:
> 
> projectA depends on projectB-1-01-SNAPSHOT
> projectA depends on projectC-1-00
> projectC depends on projectB-1-00
> 
> How does maven handle running tests on projectA, for example?
> 
> In our case, projectB-1-01-SNAPSHOT should be API-compatible with
> projectB-1-00 (i.e. we only added new method signatures and
> classes, no
> changes), but when compiling projectA, we get compile errors because
> javac does not ever see the changes introduced in the
> projectB-1-01-SNAPSHOT. 
> 
> I'm assuming that maven will put both versions on the classpath when
> executing the compile, and that javac will pick the first JAR (which
> could be either one). I would expect, though, that if the older JAR is
> first, javac would continue on to the newer JAR and pick up the added
> classes. 

No. Maven only takes one version of the JAR for the classpath. You may have a look at the
output calling Maven with the -X option.

> I'm not crazy, right?

It's the normal dependency hell :)

But in any case, Maven should take the SNAPSHOT here ... how do you declare the dependencies
in your POM?

- Jörg

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


Mime
View raw message