I'm maintaining multiple projects backed by ivy configurations. Many configurations overlap, such as:
Is there a way to import these dependencies by referencing a shared configuration?
N.B. Please don't suggest Maven, as I know about it, but it is not (yet) an option for these particular projects.
Does include do what you need, or is the problem more complicated?
From the documentation:
<ivy-module version="1.0">
<info organisation="myorg"
module="mymodule"/>
<configurations>
<include file="path/to/included-configurations.xml"/>
<conf name="conf3"/>
</configurations>
<dependencies>
<dependency name="mymodule1" rev="1.0"/>
<dependency name="mymodule2" rev="2.0" conf="conf2,conf3->*"/>
</dependencies>
</ivy-module>
with included-configurations.xml like this:
<configurations defaultconfmapping="*->@">
<conf name="conf1" visibility="public"/>
<conf name="conf2" visibility="private"/>
</configurations>
Update: For dependencies, I'm not sure it is possible. I found a discussion on importing dependencies that indicates this is by design to avoid circular dependencies.
Perhaps you could write a script to process a referenced ivy file and inline the dependencies into your project?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With