Hi,
in the documentation I read about the extra attributes:

"Extra attributes: Those extra attributes will indeed be used as identifier for 
the module like the org the name and the revision:"

https://ant.apache.org/ivy/history/2.1.0/concept.html

We would like to organize the libs for different platforms "x86_64_linux", 
"x86_64_windows" and "all" with an extra attribute. So we created an ivy 
descriptor with the extra attribute e:platform. In the dependencies we want to 
depend on the same module but for a different platform e.g. "all".

<?xml version="1.0" encoding="UTF-8"?>
<ivy-module version="2.0" xmlns:e="http://ant.apache.org/ivy/extra";>
    <info organisation="org.apache.libs" module="lib1" 
e:platform="x86_64_linux" status="integration" />

    <configurations>
        <conf name="default" />
        <conf name="dev" />
        <conf name="test" />
        <conf name="report" />
    </configurations>

    <publications>
        <artifact name="lib1" type="bin" conf="default" ext="zip" />
    </publications>

    <dependencies>
        <dependency org="org.apache.libs" name="lib1" e:platform="all" 
rev="last.integration"/>
    </dependencies>
</ivy-module>

While the ivy:retrieve step we get following error message:

java.lang.IllegalArgumentException: a module is not authorized to depend on 
itself: org.apache.libs#lib1#master;last.integration
at org.apache.ivy.core.resolve.IvyNodeCallers.addCaller(IvyNodeCallers.java:166)
at org.apache.ivy.core.resolve.IvyNode.addCaller(IvyNode.java:1076)
at org.apache.ivy.core.resolve.IvyNode.getDependencies(IvyNode.java:372)
at org.apache.ivy.core.resolve.VisitNode.getDependencies(VisitNode.java:313)
at 
org.apache.ivy.core.resolve.ResolveEngine.doFetchDependencies(ResolveEngine.java:796)
at 
org.apache.ivy.core.resolve.ResolveEngine.fetchDependencies(ResolveEngine.java:726)
at 
org.apache.ivy.core.resolve.ResolveEngine.getDependencies(ResolveEngine.java:599)
at org.apache.ivy.core.resolve.ResolveEngine.resolve(ResolveEngine.java:236)
at org.apache.ivy.core.resolve.ResolveEngine.resolve(ResolveEngine.java:197)
at org.apache.ivy.Ivy.resolve(Ivy.java:508)

The question is if ivy should support a combination of org - module - 
e:platform to uniquely  identify depending SW component - also if the same 
module name exists twice?

Thanks
Michael

Reply via email to