How to specify base dir then we run ant like ant -f somedir/dir/build.xml.
Ant sets basedir relative to build.xml, if I specify
<project basedir="." ..>
I would like to have basedir pointed to place where Ant is executed.
Use -D to override the basedir property:
ant -Dbasedir=`pwd` -f path/to/build.xml
The use of pwd
is a Linux-only thing, but you can always put the absolute path of the current directory there if you're on another platform.
I don't think there's a way to do this inside build.xml, short of re-executing ant with the ant
task.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With