DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=30457>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=30457

static targets

           Summary: static targets
           Product: Ant
           Version: 1.1
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Core
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


Would it be a nice to have feature to make some of the targets run only once 
(irrespective of how times this target gets called).

e.g

<target name="init" static="true">
<property name="abc" value = "xyz"/>
</target>

<target name="compile" depends="init">
..
</target>

<target name="package" depends="init">
..
</target>
<target name="clean" depends="init">
..
</target>

With this build.xml defination if one calls ant with targest clean, compile, 
package then init gets called three times (ant clean, compile, package).

By adding new attribute like static at target level we could make the ant 
runtime call init only once.  

There is a workaround to this by setting a unique property in the said init 
target and using unless attribute .. But I belive that this not the better 
readable solution.
i.e
<target name="init" unless="initRanOnce">
..
<property name="initRanOnce" value="true"/>
</target>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to