ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 52407] New: Support "default" values for command line arguments
Date Sun, 01 Jan 2012 11:15:05 GMT

             Bug #: 52407
           Summary: Support "default" values for command line arguments
           Product: Ant
           Version: 1.8.2
          Platform: PC
            Status: NEW
          Severity: major
          Priority: P2
         Component: Core tasks
    Classification: Unclassified

Currently <arg> tag doesn't support a default value - this value could be
passed into a task being called. Proposal: "default" attribute for this tag. 

Real life case: on my project we use Ant for platform-independent ability of
calling some command like utilities, and need to provide some parameter via
-D{name}={value}. In some cases the values are pretty static so it would be
nice to omit them in a command line. The problem is that we must handle such
'omitted' params on a level of java code of our utilities. And it would be
great if the definition of the task looked like:

<target name="mycall">
  <java ...>
    <arg value="${url}" default=""/>

If appropriate parameter is not specified by a user in a command line, Ant
script would handle this and substitute a proper value. Benefit: no need to
handle default values on the level of java code. 


Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.

View raw message