ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 29930] New: - some thing like static blocks of java
Date Tue, 06 Jul 2004 09:32:28 GMT
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=29930>.
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=29930

some thing like static blocks of java

           Summary: some thing like static blocks of java
           Product: Ant
           Version: 1.1
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Core
        AssignedTo: dev@ant.apache.org
        ReportedBy: Nagendra.Raja@sun.com


Hi!

Not sure if it is good idea to apply OOAD Featurs to ant. But any way I posting 
this for a discussion and some conclutions there after..

I am looking for some kind of static targets, meaning how may ever time this 
targets called (using dependends attribute), but ant run time should run this 
target only once.

eg.

<target name="init">
</target>

<target name="src" depends="init">
</target>

<target name="packages" depends="init">

<target name="all" depends="src,packages"/>

when target 'all' is called init gets called twice, which could be avoided if 
static attribute is supported by ant eg. one could write static targets as 
<target name="init" static="true">
</target>

I do see some workaround like below which would have the same effect.. but I 
consider this as less readable

<target name="init" unless="isInitRanOnce">
<property name="isInitRanOnce" value="true"/>
</target>

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


Mime
View raw message