ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Petronius <>
Subject Passing command Line args for a list
Date Fri, 04 Mar 2016 17:13:07 GMT

We are tyring to automate an ant task, but finding it impossible to pass a 
command line argument to a property inside a list.  

We need to pass Name and Description for each agent specified from the 
command line.  for ex:
ant -f build.xml addNodes -Dagents="d01, d02, d03" -D{node???}='node1' -
D{node_description???}='node1 description'

each agent d01/d02/d03 will need have name and description.

<target name="addNodes" depends="clean">
  <input message="Agents Name Seperated By , :" addproperty="agents" />
  <for list="${agents}" delimiter="," param="agent">
      <input message="Node Name:" addproperty="node" />
      <input message="Node Description:" addproperty="node_description" />
             <!-- external task -->
         <var name="node" unset="true"/>

Any suggestions is greatly appreciated.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message