Here's a very rough first cut at a new "builder" resolver.
Here's the basic idea: it works like URLResolver for the ivy.xml file. For other artifacts, it short-circuits the normal functioning: first, it gets the build.xml file by finding the "builder" artifact (using normal URLResolver stuff). This build.xml is just an ant file that is expected to do whatever action necessary to "build" the artifacts and put them in an artifacts/ subdirectory. This build.xml is executed by running "ant" as a separate process. Then the resolver returns the artifacts found within that artifacts/ subdirectory.
It includes code to clean up the work directory when the JVM exits.
Some things that may to be improved:
- Would it be better to invoke ant from within the same JVM? Actually I think not to avoid property pollution, etc. which might make the build process less robust and reproducible.
- Ivy is not caching the built artifacts for some reason (I think)
- It would be fancier to define custom XML for the build file and XSLT into a build.xml, but maybe not worth the trouble either.
- Need to add checksum verification to the build.xml file after it downloads the ZIP file.