May 27

Previously we covered passing command line arguments to Ant. We can use that to specify the value to be used for arg tag values. Here is an example:

ant -Dargstring="-test -abc file.out" build

In the build script we have the following:

  <java classname="test.Main" fork="yes" >
    <arg value="${argstring}"/>

This will result in the arguments “-test -abc file.out” being passed to the java call in the build script.

written by objects \\ tags: , , , ,