On 6/07/2006 3:40 AM, Rinku wrote:
Just wondering if rather than having an <exclusion> list stuffed in each
of <dependency> elements, if we could have some sort of <compatible>
tag that can 'advise' Maven the choosing strategy for conflicting
artifacts (pretty much like version ranges).
For sake of an example:
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.2</version>
<compatible> <=3.8.2 </compatible>
</dependency>
. . .
</dependencies>
So, Maven can safely choose 3.8.2 for all varying versions JUnit less
than or equal to 3.8.2, but not 4.0.
That's no different to (,3.8.2] now.
The other thing is that when an artifact is published to a repo, the
publisher can add some compatibility meta-data as well to indicate that
the current version is incompatible with certain other versions or the
artifacts.
Yes, this would be a good addition to 2.1 - I think it is already in the
wiki (but should be added if not).
This would only need to affect open-upper-ended ranges (including soft
versions). So for junit, if we assumed 4.0 was not compatible with <
4.0, ranges would change like this:
[3.8,) --> [3.8,4.0)
[3.8,4.1] --> unchanged (the range explicitly allows the
incompatibility, maybe a warning)
(,5.0] --> unchanged (the range explicitly allows the incompatibility,
maybe a warning)
3.8 --> (,4.0) (suggest 3.8)
Then the normal logic could kick in.
- Brett
--
Apache Maven - http://maven.apache.org/
Better Builds with Maven - http://library.mergere.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]