On 13/12/2011, at 8:19 AM, Daz DeBoer wrote:
> On 12 December 2011 14:26, Robert Watkins <[email protected]> wrote:
> Indeed, the functionality is a subset of the support for version ranges, as
> documented at
> http://docs.codehaus.org/display/MAVEN/Dependency+Mediation+and+Conflict+Resolution#DependencyMediationandConflictResolution-DependencyVersionRanges
>
> (It's the 'hard requirement' syntax)
>
> This isn't just a Maven feature - Ivy has the same functionality with a
> different syntax -
> http://ant.apache.org/ivy/history/trunk/settings/version-matchers.html It
> just so happens that for this particular area, the syntax is the same.
>
> Well as far as I know, ivy doesn't support the concept of "hard" version
> requirements. So ivy might support the [1.0] syntax, but I don't think it
> will behave the way maven does. (I'm not certain, because in Ivy the
> responsibility for ejecting versions is smeared between the
> DependencyResolver implementations and the Ivy ResolveEngine. So it may
> depend on the DependencyResolvers you have configured.)
To the best of my knowledge, Ivy has the same end result. I'll expand my test
cases to include an 'ant+ivy' example to verify that, and get back to you.
>
> Maven's "soft requirements" never conflict - the highest one wins, similar to
> Gradle. Version ranges restrict the set of valid matches, thus setting up the
> possibility for conflict. So in the example of one dependency with a range of
> [1.0, 2.0], and another dependency with a 'soft range' of 3.0, then you end
> up using version 2.0. However, if the second dependency was [2.1, 3.0], then
> you get a conflict and the build fails. (Ivy works the same way)
>
>
> So version ranges are always "hard requirements"? It's not particularly clear
> from the linked docs.
>
They're always hard. The syntax difference with () and [] are about inclusive
vs exclusive specifications.
> Thanks for the feedback. We'll certainly look at supporting the idea of a
> "hard" dependency requirement.
If I can get the project building in Eclipse, I'll certainly look into helping
out in that respect.
--
"Software is too expensive to build cheaply"
Robert Watkins twitter: @twasink http://twasink.net/ [email protected]