I'm trying to run a script that uses an ANT build but I don't want to have to run it from the location where my build.xml file is. Is there a way to pass the location to ant?
Thanks in advanced
I'm trying to run a script that uses an ANT build but I don't want to have to run it from the location where my build.xml file is. Is there a way to pass the location to ant?
Thanks in advanced
Use the -buildfile
option. For e.g.
$ cd /some/other/directory/
$ ant -buildfile /path/to/build/file.xml
There are two synonymous options for this, -file
and -f
. Therefore you can use either of
$ ant -file /path/to/build/file.xml
or
$ ant -f /path/to/build/file.xml