This is the technique; you should be able to adapt it to your needs very
easily.

Suppose we have a property named 'client.only' defined as follows:

<property name="client.only" value="false"/>

The default value of the property is 'false'. If you want to override the
value of the property from the command line, do this on the command line:

ant -Dclient.only=true

Note that there are no spaces and no quotes, apostrophes, or backtics
anywhere in the expression that overrides the value of the property.

Naturally, you can extend this concept to as many properties as you want.
For example:

ant -Dclient.only=true -Duserid=me -Dpassword=mypass

Rhino

----- Original Message ----- 
From: "George Dibi" <[EMAIL PROTECTED]>
To: "Ant Users List" <user@ant.apache.org>
Sent: Friday, January 07, 2005 6:40 PM
Subject: How to command line argument to build.xml file


Can someone tell me how to pass a stdin argument on a build file
And that argument be a value in arg line.
i.e >ant isoft.xml isoftlbl.txt
where isoftlbl.txt is the stdin that will be a value to my arg line.

<target name="isoftLabel">
   <echo>

   ${perl.bin.dir} ${ivc.perl.target} ${drive} ${BUILD_VIEW}
${IVCOMMONVOB_VER} ${IVCOMMONVOB_BLD}
  </echo>
  <exec executable="${ant.common.dir}/createProcess.exe">
               <arg line="${basedir} ${perl.bin.dir} makelabelpl
isoftlbl.txt "/>
        </exec>
  </target>

Thanks



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to