You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by "Lorin K (JIRA)" <ji...@apache.org> on 2011/01/13 05:13:45 UTC

[jira] Updated: (IVY-1258) Multiple copies of dependency grabbed when it is both direct and transitive

     [ https://issues.apache.org/jira/browse/IVY-1258?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lorin K updated IVY-1258:
-------------------------

    Attachment: sample.zip

A sample repository with an ivy.xml and ant script that reproduces the problem.

> Multiple copies of dependency grabbed when it is both direct and transitive
> ---------------------------------------------------------------------------
>
>                 Key: IVY-1258
>                 URL: https://issues.apache.org/jira/browse/IVY-1258
>             Project: Ivy
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.2.0
>         Environment: Any
>            Reporter: Lorin K
>         Attachments: sample.zip
>
>
> 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.