ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Frank W. Zammetti" <fzli...@omnytex.com>
Subject Re: Hi, Ant dev, I have questiones on multiple run Target
Date Thu, 27 Dec 2007 19:58:04 GMT
This is just a guess, I don't know this for sure, but I wouldn't be 
surprised to learn it has to do with dependencies... i.e., isn't this in 
effect saying that task aaaa (the second time) is dependent on task 
aaaa?!?  Bit of a paradox there I'd think!  I can envision a pretty 
logical implementation of dependency tracking that would result in this 
behavior too (although I have no clue how Ant implements it).

That's just a guess, and I'm looking forward to an answer from someone 
who knows what they're talking about because it's an interesting 
question.  FYI, I personally would use antcall for a situation like 
this, make the targets much more like reusable functions than dependent 
task, but that's just me.

Frank

--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM/Yahoo: fzammetti
MSN: fzammetti@hotmail.com
Author of "Practical Ajax Projects With Java Technology"
  (2006, Apress, ISBN 1-59059-695-1)
and "JavaScript, DOM Scripting and Ajax Projects"
  (2007, Apress, ISBN 1-59059-816-4)
Java Web Parts - http://javawebparts.sourceforge.net
  Supplying the wheel, so you don't have to reinvent it!

Vincent Li wrote:
> Hi Ant dev,
> 
>  
> 
> I found Ant can't run a target multiple times, a small example is
> followed, could you please hint me how to make it work??
> 
>  
> 
> Source Code:
> 
> <project name="11" default="all" basedir=".">
> 
>       <target name="all" depends="aaaa, bbbb, aaaa, bbbb" />
> 
>       
> 
>       <target name="aaaa">
> 
>             <echo message="aaaaa" />
> 
>       </target>
> 
>       
> 
>       <target name="bbbb">
> 
>             <echo message="bbbbb" />
> 
>       </target>
> 
> </project>
> 
>  
> 
> Output:
> 
>       Buildfile: D:\test.xml
> 
> aaaa:
> 
>      [echo] aaaaa
> 
> bbbb:
> 
>      [echo] bbbbb
> 
> all:
> 
> BUILD SUCCESSFUL
> 
> Total time: 234 milliseconds
> 
>  
> 
> What I am expecting is that both "aaaaa" and "bbbbb" should shown twice,
> how can I achieve this?
> 
> Looking forward for your reply,
> 
>  
> 
>  
> 
>  
> 
> Thanks
> 
> Vincent
> 
>  
> 
> 
> 
> 
> ------------------------------------------------------------------------
> 
> No virus found in this incoming message.
> Checked by AVG Free Edition. 
> Version: 7.5.516 / Virus Database: 269.17.9/1198 - Release Date: 12/26/2007 5:26 PM


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


Mime
View raw message