Question: 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.

Answer: 
another solution (if it makes more sense in some cases) could be to **override `basedir` via the `var` task** from the `antcontrib` extension as described here: <https://stackoverflow.com/a/25786329/1915920>
I found, that using following solution is the easiest.

```
pushd somedir/dir && ant && popd

```

Although is seems to be to easy - it works.