Sadly, the only solution I could find was to use the java task to invoke
ant in a new JVM for each sub-project (with ant-contrib for task to loop
through directories). I use one shared build file for all projects. I
know this is not the "ant way", but it makes a lot more sense to me than
copying my build file a dozen places, or even having a dozen stub files
that inherit from the same file. So, I really wish that the ant/subant
tasks did not have this bogus cyclical call checking. At least check if
the basedir is the same!
Francisco Tolmasky wrote:
My project currently uses a common build file to build a number of
sub- projects
(each of which may also have a sub-project as well). My first
inclination was thus
to use the subant task to build all these subprojects, as so (almost
straight out of
and subtask documentation):
<macrodef name = "iterate">
<attribute name = "target"/>
<sequential>
<subant inheritall="false" inheritrefs="false" target =
"@{target}" genericantfile = "build.xml">
<dirset dir = "." includes = "*.subproj"/>
</subant>
</sequential>
</macrodef>
<target name = "Build-Project">
<!-- Do Stuff -->
<iterate target = "Build-Project" />
</target>
However, this fails with "subant task calling its own parent
target." This shouldn't be happening
because I am calling the target on a different directory. I snooped
around the web and enough
people have run into this for me to consider it a bug and thus a lost
cause. My question instead
is how to alternatively achieve this same effect. I tried using
<apply executable = "ant"> to
achieve something similar to this, but with little luck. Any
thoughts or suggestions?
Thanks,
Francisco Tolmasky
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Geoffrey Mitchell
Programmer/Analyst
Home Decorator's Collection
314-684-1062
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]