ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Francisco Tolmasky <tolma...@gmail.com>
Subject Re: AW: Alternative to subant
Date Thu, 29 Nov 2007 18:19:10 GMT
I've now changed it to:

     <macrodef name = "iterate">

         <attribute name = "target"/>

         <sequential>
             <subant target = "@{target}">
                 <fileset dir="." includes="*.subproj/build.xml"/>
             </subant>
         </sequential>

     </macrodef>

And I am still getting the same error "ubant task calling its own  
parent target."  I placed an echo inside of
"Build-Project" to investigate what was going on:

<target name = "Build-Project">
	<echo message = "${basedir}">
	<iterate target = "Build-Project">
</target>

It seems that the basedir does not change when it iterates on the  
subdirectories, which may explain this, because I get:

[echo] root-directory (fine)
[echo] some-directory (fine)
[echo] some-directory (should be some-directory/whatever.subproj)
error

On Nov 29, 2007, at 4:53 AM, <Jan.Materne@rzf.fin-nrw.de> wrote:

> The problem is that you use the "genericantfile" attribute.
> This implies the current (master) script into the projects.  
> Therefore you'll get a cycle between <subant> and <import>.
>
> Jan
>
>> -----Urspr√ľngliche Nachricht-----
>> Von: Francisco Tolmasky [mailto:tolmasky@gmail.com]
>> Gesendet: Donnerstag, 29. November 2007 13:43
>> An: user@ant.apache.org
>> Betreff: Alternative to subant
>>
>> 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: user-unsubscribe@ant.apache.org
>> For additional commands, e-mail: user-help@ant.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message