views:

252

answers:

2

I have a bunch of modules which I'd like to all have their own ant build files. However, modules have dependencies on other modules. What's the best way to define dependencies between build files?

I've looked at the <import>, <ant>, and <antcall> tasks, but it seems like maybe there's a better way to do this.

A: 

I try to put all the definitions into Antlib and including them into the main build.xml file. If you write your macros following the "convention over configuration" rule, you'll be surprised to see how concise Ant can be.

If you want to see an example, you can take a look at my sandbox on Google code

Vladimir
+1  A: 

You could look into using Apache Ivy (features) for managing your dependencies. There's a tutorial on how to use Ivy in a multiple project environment which sounds like what you're after. I'd recommend following through the tutorials from the beginning as it can be a bit tricky to get your head around it to start with.

Simon Lieschke