I'm having trouble retrieving the dependencies I expect by configuration name. I have a shared library I'm publishing to a local repository, using the following ivy file:
<?xml version="1.0"?>
<ivy-module version="2.0">
<info organisation="my.org" module="my-stuff" status="release"/>
<configurations>
<conf name="runtime"/>
<conf name="provided" extends="runtime"/>
<conf name="test" extends="provided"/>
</configurations>
<publications>
<artifact name="my-stuff" type="jar" ext="jar" conf="*"/>
<artifact name="my-stuff" type="source" ext="zip" conf="*"/>
</publications>
<dependencies>
<dependency org="javax.servlet" name="servlet-api" rev="2.4" conf="provided,test -> master"/>
<dependency org="org.apache.tomcat" name="tomcat-dbcp" rev="7.0.47" conf="provided,test -> master"/>
<dependency org="log4j" name="log4j" rev="1.2.17" conf="* -> master"/>
<dependency org="my.org" name="my-module" rev="1.2.3" conf="* -> default"/>
<dependency org="junit" name="junit" rev="4.5" conf="provided,test -> master"/>
<dependency org="org.apache.ant" name="ant" rev="1.8.4" conf="provided,test -> master"/>
</dependencies>
</ivy-module>
So far, so good. I publish the my-stuff jar, and if I try to retrieve its dependencies by configuration, I get what I expect, two dependencies in the runtime configuration, and six each in the provided and test configurations. The trouble starts when I try to retrieve dependencies of something that depends on my-stuff. I use this ivy file:
<?xml version="1.0"?>
<ivy-module version="2.0">
<info organisation="my.org" module="test-my-stuff" status="release"/>
<configurations>
<conf name="runtime"/>
<conf name="provided" extends="runtime"/>
<conf name="test" extends="provided"/>
</configurations>
<dependencies>
<dependency org="my.org" name="my-stuff" rev="1.1"/>
</dependencies>
</ivy-module>
Now if I try to retrieve the runtime configuration, instead of getting the my-stuff jar, log4j and my-module, I get twelve jars, including activation.jar and mail.jar, things I don't get when I use the first ivy file to retrieve. Why is my second ivy file pulling everything into the runtime configuration? What exactly am I doing wrong?
If, on the other hand, I add a configuration mapping to the dependency in the second file, such as runtime->runtime;provided->provided;test->test, resolve will fail, claiming it can't find my-stuff.