I'm using
Ant 1.6.5, and I've started experimenting with macrodefs to build our EJBs. Basically, we have 10 to 15
EJB jar files. All classes in a directory are put into a jar, and then the EJB compiler is run on the jar.
The macrodef for creating the jar file is fine. The jar task automatically checks the dependencies between the jar file and the files it contains. If the jar is out-of-date, it is recreated. The EJB compile is a problem though. It compiles the "naked" jar and outputs the ready-to-deploy EJB, but to Ant it just looks like a
Java task. Therefore, I have to put in the dependency check myself and "antcall" to a target with something like unless="${this.jar}.uptodate". Using antcall defeats the purpose of having a macrodef, but I can't figure out any other way to do it. I could use an "if" task from ant-contrib, but the docs say that uses antcall behind the scenes anyway. Help!