https://issues.apache.org/bugzilla/show_bug.cgi?id=52407
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
AssignedTo: [email protected]
ReportedBy: [email protected]
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="http://mmm.com"/>
</java>
</target>
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.
Regards,
Ivan
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.