Hi all

tldr; there is a bug report about Ivy no handling dependencies to
modules with multiple artifacts - some with classifier, but not all -
and the way I fixed this seems to work. But I have no idea whether I am
fixing it the correct way and need help by somebody understanding Ivy'
semantics - I don't.

longer story:

Over on the ivy-user list somebody reported Ivy would only resolve the
"data" classified artifact as transitive dependency of Saxon-HE where
Saxon's POM contains


and yes, this is true for the current master branch. This is the ivy.xml
created from the POM snippet above

    <dependency org="org.xmlresolver" name="xmlresolver" rev="5.1.1"
      <artifact name="xmlresolver" type="jar" ext="jar" conf="compile" 

I created https://issues.apache.org/jira/browse/IVY-1642 and tried to
fix it. My understanding was that this Ivy dependency means Saxon-HE
depends on the "data" artifact and only the data artifact and the
correct solution would be to add a second artifact that matches the
"default" name/type/ext.

So I "fixed" PomModuleDescriptorBuilder to do what I believed to be the
correct translation of the POM.

When I ran the tests ResolveTest#testIvy1580 failed. The modified code
would suddenly return three artifacts as dependency not two as
expected. The non-classifier artifact was returned twice.

First of all this made me discover
https://issues.apache.org/jira/browse/IVY-1580 which, I believe,
describes the same error as the new IVY-1642.

Jaikiran fixed the problem back then with
. He tackled it from a different angle, rather than changing the way POM
dependencies are translated he changed the way dependencies are resolved
by throwing in an "include everything" rule under certain
circumstances. I must admit this change is beyond my understanding of

Backing out his change to IvyNodeUsage fixed the test in my branch. So
maybe my change alone would be enough to resolve the problem? Or there
are two different issues at hand and each of us just fixed one part of

In my branch I decided to keep the IVY-1580 change and "fix" the test by
making sure Ivy's reported dependencies don't contain any
duplicates. The result can be seen here


I must admit that I just don't know whether this is correct - apart from
that it fixes the bug reproducer for IVY-1642.

I'll be grateful for any insight


To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org
For additional commands, e-mail: dev-h...@ant.apache.org

Reply via email to