ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 52407] Support "default" values for command line arguments
Date Thu, 12 Jan 2012 15:47:01 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=52407

Stefan Bodewig <bodewig@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WORKSFORME
         OS/Version|                            |All

--- Comment #1 from Stefan Bodewig <bodewig@apache.org> 2012-01-12 15:47:01 UTC ---
There already is a way to provide default values for properties, the property
task.

What you are trying to do is

<target name="mycall">
  <property name="url" value="http://mmm.com"/>
  <java ...>
    <arg value="${url}"/>
  </java>
</target>

where the property task won't do anything if the url property has already been
set via the command line.

Another option would be the props Antlib with something like

  <java ...>
    <arg value="${url:=http://mmm.com}"/>
  </java>

but since it hasn't been released yet, I'm reluctant to recommending it.

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

Mime
View raw message