When I launch
$ant -Duser.home=/tmp -f build.xml
it should output "/tmp" for provided build.xml, but is uses my real user home instead.
The bug seems to be fixed in upstream https://issues.apache.org/bugzilla/show_bug.cgi?id=51792, but I can't found the patch.
Created attachment 324730 [details]
monsieurp@epsilon ~/ant $ ant -version
Apache Ant(TM) version 1.9.1 compiled on March 15 2015
monsieurp@epsilon ~/ant $ cat demo.xml
<?xml version="1.0" encoding="UTF-8"?>
<project default="dist" basedir="." name="Groovy" >
<target name="dist" >
monsieurp@epsilon ~/ant $ ant -Duser.home=/tmp -f demo.xml
Total time: 0 seconds
This bug seems to have been solved in recent versions of Ant. Reopen if you still encounter the issue.