tags:

views:

74

answers:

1

I'm looking to move to Apache Ivy for dependency management on one of our existing projects. The project publishes many artefacts, and the artefacts it produces are likely to change in the future, so I don't want to enumerate all of the publications in the ivy.xml file -- I'd like Ivy to just publish all the files in a given directory.

I considered auto-generating a list of the files built and using XSLT to insert it into the ivy.xml, but that seems a little cumbersome for what I'd expect to be a reasonably common requirement.

Is there a better way to do this? Can Ivy pick up all the files in a directory and ignore the publications in the Ivy file? Or is there some way to get Ivy to use different files for publication and for fetching, so I can avoid having to use XSLT to merge the files.

A: 

There's no built-in way in ivy to do what you want. Ivy in general requires a certain level of precision to do what it does, and that level of precision includes explicitly specifying each artifact published by a module in the ivy file (for example, this allows ivy to know what the artifacts are without requiring all resolvers to support "directory listing").

Your best bet is an XSLT file containing the static part of your ivy file, where you generate the dynamic part (the artifact list) at runtime.

Archie