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 42447] New: - Add support for conditions to echo task and arg element
Date Thu, 17 May 2007 19:29:14 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=42447>.
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=42447

           Summary: Add support for conditions to echo task and arg element
           Product: Ant
           Version: unspecified
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Core tasks
        AssignedTo: dev@ant.apache.org
        ReportedBy: david.jackman@fastsearch.com


I'm creating some macros to make our build scripts more efficient.  In order to
make the macros more flexible, I'd like to have macro attributes that turn on or
off certain command line flags to a program that the macro executes.  In some
cases, the macro sends these flags using arg elements within the exec task.  In
other cases I'm building an options file that gets passed to the program.

This would be easy if I could do something like this:
<echo file="myoptionsfile" append="true">
<condition>
<istrue value="@{debug}"/>
</condition>
--debug
</echo>

or

<arg value="--debug">
<condition>
<istrue value="@{debug}"/>
</condition>
</arg>

Or here's an even clearer alternative, assuming a property named "true" exists
and a property named "false" does not:

<echo if="@{debug}" file="myoptionsfile" append="true">
--debug
</echo>

or

<arg if="@{debug}" value="--debug" />

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


Mime
View raw message