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 14056] New: - 'if' task for ant
Date Tue, 29 Oct 2002 18:00:45 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14056>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14056

'if' task for ant

           Summary: 'if' task for ant
           Product: Ant
           Version: 1.5.1
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Enhancement
          Priority: Other
         Component: Core tasks
        AssignedTo: ant-dev@jakarta.apache.org
        ReportedBy: gtaglang@free.fr


I do not know if it was already discussed, or is schedule for inclusion, but
making an 'if' task would really be great, the if in the target is nice but far
from easy to use.

A simple use case would be (syntax could be better):
<target name="foo">
  <if value="${var}" equals="true">
    <sometask/>
    <else>
      <someothertask/>
    </else>
  </if>
</target>

Currently this is implemented with the less than obvious:
<condition name="fooCondition">
  <equals arg1="${var}" arg2="true"/>
</condition>
<target name="foo" depends="fooTrueCase,fooFalseCase"/>
<target name="fooTrueCase" if="fooCondition">
  <sometask/>
</target>
<target name="fooFalseCase" unless="fooCondition">
  <someothertask/>
</target>

If there is nothing that I could use/backport with the latest stable release, I
could implement it (feedback appreciated for the syntax) and contribute it.

Best regards,
    Guillaume

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


Mime
View raw message