0

Possible Duplicate:
A way to control dependencies ranges for upstream dependencies using Ivy?

My Ivy repository contains:

  • libAbc version 2.4 and 2.5 – no dependencies
  • libXyz versions 1.0 – which depends on libAbc version [2.2, )

My application uses these libraries, and has the following Ivy dependencies:

    <dependency name="libAbc" rev="2.4" />
    <dependency name="libXyz" rev="1.0" />

I don't want to upgrade to the newer version of libAbc just yet, because there are some breaking changes and I don't have time to adapt my code.

But the presence of the newer version in the repository is enough to get 2.5 in my Ivy resolve. 2.4 is evicted because both match the version constraints for libAbc.

I have tried using <dependency name="libAbc" rev="[2.4, 2.4]" />, but this is still evicted in favour of 2.5.

How can I ensure that version 2.4 is resolved, without removing 2.5 from the repository? Is it possible to give priority to the settings in the top level Ivy file in preference to those in the dependencies' Ivy files, where the two are compatible?

Community
  • 1
  • 1
Joe Kearney
  • 7,397
  • 6
  • 34
  • 45

1 Answers1

1

There's an attribute on dependency called force. From the Attributes section on this page:

a boolean to give an indication to conflict manager that this dependency should be forced to this revision (see conflicts manager)

The following forces the dependency:

<dependency name="libAbc" rev="2.4" force="true" />
Joe Kearney
  • 7,397
  • 6
  • 34
  • 45