I have a huge dependency which exports a number of dependencies. I wish to restrict my retriev to couple of them. The pattern is [artifact]-[revision].[ext].
How do i specify this in ivy:retrieve task call
I have a huge dependency which exports a number of dependencies. I wish to restrict my retriev to couple of them. The pattern is [artifact]-[revision].[ext].
How do i specify this in ivy:retrieve task call
Configurations in ivy is the mechanism for controlling groups of dependencies within ivy.
Once these configurations have been setup in your ivy file it becomes simple to retrieve them within your ANT build as follows:
<ivy:retrieve pattern="lib/[artifact].[ext]" conf="my_custom_conf"/> Perhaps you could supply some more details of what you want to achieve and someone can demonstrate how to setup a configuration for this purpose. (I'd also recommend searching the Stackoverflow ivy tag, for other examples)
If an ivy module publishes more than one artifact it's possible to restrict the dependency in your ivy file as follows:
<configurations> .. <conf name="archives" description="Configuration containing only archive files"/> </configurations> <dependencies> .. <dependency org="acme" name="foo" rev="2.0" conf="archives->default"> <artifact name="a1" type="tar"/> <artifact name="an" type="zip"/> </dependency> </dependencies> Alternatively..
Look into the remote modules's ivy.xml. There may already be a configuration setup for these files, in which case it becomes a lot simpler (because it's been pre-setup)
<dependency org="acme" name="foo" rev="2.0" conf="archives->remotearchives"/> The "conf" part of the dependency is mapping the remote configuration onto your local one.
ivy:module. <ivy-module version="1.0"> <info organisation="your-org" module="your-module"/> <configurations> ... </ivy-module> And referred to it as <ivy:retrieve file="ivy" pattern="${ivy.lib.dir}/[conf]/[artifact].[ext]"/> in your build.xml file. Hope this helps someone.