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=28882>.
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=28882

Add if and unless attributes to ProjectComponent.

           Summary: Add if and unless attributes to ProjectComponent.
           Product: Ant
           Version: 1.7Alpha (nightly)
          Platform: All
        OS/Version: Other
            Status: NEW
          Severity: Enhancement
          Priority: Other
         Component: Core
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


The ProjectComponent object should have a setIf and setUnless method. If the 
property is not set, the component is not take into account.
If it's not possible It should be at least possible in the Task object.
This feature would add some flexibility in Ant file by removing copy/paste for 
similar targets or by removing extra targets created only for the purpose of the
if/unless.

This feature has been discussed on Ant developer mailing list at
http://marc.theaimsgroup.com/?t=108369006500001&r=1&w=2

Examples
    <echo message="username property not set using ${user.name}" 
unless="username"/>
    <property name="username" value="${user.name}/>

    <copy dir="dest">
      <fileset dir="src">
        <excluse name="test/**/*" unless="testing"/>
      </fileset>
    </copy>
    
    <!-- In this case it's the caller who set the condition -->
    <antcall target="upload-files" if="uptodate"/>
    
    <checksum file="foo.bar" if="file-exists"/>

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

Reply via email to