ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lorin K (JIRA)" <>
Subject [jira] Created: (IVY-1258) Multiple copies of dependency grabbed when it is both direct and transitive
Date Thu, 13 Jan 2011 03:41:48 GMT
Multiple copies of dependency grabbed when it is both direct and transitive

                 Key: IVY-1258
             Project: Ivy
          Issue Type: Bug
          Components: Core
    Affects Versions: 2.2.0
         Environment: Any
            Reporter: Lorin K

Kind of a complicated edge case, but very central to the way our build is laid out:

If you have a direct dependency on a shared component, that is also a transitive dependency,
and you use force="true" to force a particular version of the shared component to be resolved,
in some cases you can end up with multiple versions getting downloaded.

As far as we can tell this only occurs in the following scenario:
  * There is more than one transitive dependency on the shared library
  * The components that depend on the shared dependency reference it with a range
  * The ranges are not identical in the two components that reference the shared library

For example: two versions of shared exist, 2.1.1 and integration-0.0.0 

In ivy.xml
<dependency name="shared" rev="integration-0.0.0" conf="src,build->default" force="true"
<dependency name="direct_dependency" rev="1.0"  conf="src,build->default" />

In in direct_dependency ivy.xml:
        <dependency name="component_a" rev="[2,3[" />
        <dependency name="component_b" rev="[2,3["/>

In component_a ivy.xml:
      <dependency name="shared" rev="[2,3.0[" />

In component_b ivy.xml
    <dependency name="shared" rev="[2.1,3.0[" />

If the references to 'shared' in component_a and component_b are both ranges and not exactly
the same, we end up with both shared-integration-0.0.0 and shared-2.1.2 getting downloaded.

If either reference is _not_ a range, or if both ranges are identical, then shared-2.1.2 is
evicted and only integration-0.0.0 is downloaded.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message