ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Burgess, Benjamin" <BBurg...@tiaa-cref.org>
Subject RE: Am I being a dumbass - or is there an antcall bug?
Date Tue, 25 Jul 2006 13:54:28 GMT
Assuming you are using the command "ant target1, target2, target3" then
setting inheritall="true" on each of the antcall's will indeed guarantee
that run_once_target will only be executed once, while dependency1 and 2
will still be called three times each.

 

Target1 appears to be correct, while target 2 and 3 each make what
appears to be bad use of the antcall task.  Making target 2 and 3 look
like 1 will result in each target getting executed only once total.

 

Ben

________________________________

From: Nick.Minutello@ubs.com [mailto:Nick.Minutello@ubs.com] 
Sent: Monday, July 24, 2006 6:37 PM
To: user@ant.apache.org
Subject: Am I being a dumbass - or is there an antcall bug?

 

I would expect that when calling all targets below (target1, target2 &
target3) the "run_once_target" would get called only... once.

However, its not so. 
With "target2", it gets called twice. 
Is that a bug? 

Doesn't seem to matter if I set inheritall="true" or not.... 

ant -version 
Apache Ant version 1.6.5 compiled on June 2 2005 

-Nick 

 

<project name="moo" default="target1"> 

    <target name="run_once_target" unless="run_once_target.done"> 
        <echo message="## running run_once_target"/> 
        <property name="run_once_target.done" value="true"/> 
    </target> 
    <target name="dependancy1" depends="run_once_target"> 
        <echo message="## running dependancy1"/> 
    </target> 
    <target name="dependancy2" depends="run_once_target"> 
        <echo message="## running dependancy2"/> 
    </target> 

    <target name="target1" depends="dependancy1, dependancy2"> 
        <echo message="## running target1"/> 
    </target> 

    <target name="target2"> 
        <echo message="## running target2"/> 
        <antcall target="dependancy1"/> 
        <antcall target="dependancy2"/> 
    </target> 

    <target name="target3" depends="run_once_target"> 
        <echo message="## running target3"/> 
        <antcall target="dependancy1"/> 
        <antcall target="dependancy2"/> 
    </target> 
</project> 



**************************************************************
This message, including any attachments, contains confidential information intended for a
specific individual and purpose, and is protected by law.  If you are not the intended recipient,
please contact sender immediately by reply e-mail and destroy all copies.  You are hereby
notified that any disclosure, copying, or distribution of this message, or the taking of any
action based on it, is strictly prohibited.
TIAA-CREF
**************************************************************


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message