title: Setting ivy home directory in Ant
body: <p>I would like to set the ivy.default.ivy.user.dir to something other than the default <code>${user.home}/.ivy2</code>. I can do this on the command line with </p>
  
  <p><code>ant -Divy.default.ivy.user.dir=${WORKSPACE}/IVYCACHE</code>.  But, I would like to have it set without a command line arg.  I have tried setting this property in my build.xml, my common.xml and my ivysettings.xml.  The strange thing is, that it seems to set the default cache to this path, but the verbose output says that there is no default setting for user.dir, so it uses the <code>${user.home}/.ivy2</code> path.  </p>
  
  <p>Here is the output when I set the user.dir in my build.xml file.
  Strangely, it sets the default cache to the path I used for user.dir</p>
  
  <pre>
  [ivy:buildlist] No ivy:settings found for the default reference 'ivy.instance'.  A default instance will be used
  [ivy:buildlist] Loading jar:file:/usr/local/ant/lib/ivy-2.2.0.jar!/org/apache/ivy/core/settings/ivy.properties
  [ivy:buildlist] searching settings file: trying /home/hudson/.hudson/jobs/Next_CI/workspace/ivysettings.xml
  [ivy:buildlist] searching settings file: trying /home/hudson/.hudson/jobs/Next_CI/workspace/ivyconf.xml
  [ivy:buildlist] searching settings file: trying ivysettings.xml
  [ivy:buildlist] searching settings file: trying ivyconf.xml
  [ivy:buildlist] no settings file found, using default...
  [ivy:buildlist] :: Ivy 2.2.0 - 20100923230623 :: http://ant.apache.org/ivy/ ::
  [ivy:buildlist] jakarta commons httpclient not found: using jdk url handling
  [ivy:buildlist] :: loading settings :: url = jar:file:/usr/local/ant/lib/ivy-2.2.0.jar!/org/apache/ivy/core/settings/ivysettings.xml
  [ivy:buildlist] including url: jar:file:/usr/local/ant/lib/ivy-2.2.0.jar!/org/apache/ivy/core/settings/ivysettings-public.xml
  [ivy:buildlist] no default cache defined: set to /home/hudson/.hudson/jobs/Next_CI/workspace/ivy2/cache
  [ivy:buildlist] including url: jar:file:/usr/local/ant/lib/ivy-2.2.0.jar!/org/apache/ivy/core/settings/ivysettings-shared.xml
  [ivy:buildlist] including url: jar:file:/usr/local/ant/lib/ivy-2.2.0.jar!/org/apache/ivy/core/settings/ivysettings-local.xml
  [ivy:buildlist] including url: jar:file:/usr/local/ant/lib/ivy-2.2.0.jar!/org/apache/ivy/core/settings/ivysettings-main-chain.xml
  [ivy:buildlist] including url: jar:file:/usr/local/ant/lib/ivy-2.2.0.jar!/org/apache/ivy/core/settings/ivysettings-default-chain.xml
  [ivy:buildlist] settings loaded (71ms)
  [ivy:buildlist]         default cache: /home/hudson/.hudson/jobs/Next_CI/workspace/ivy2/cache
  </pre>
  
  <p>Then later, it claims that user.dir is not set anywhere.
  resolve:</p>
  
  <pre>
  [ivy:resolve] Loading jar:file:/usr/local/ant/lib/ivy-2.2.0.jar!/org/apache/ivy/core/settings/ivy.properties
  [ivy:resolve] jakarta commons httpclient not found: using jdk url handling
  [ivy:resolve] :: loading settings :: file = /home/hudson/.hudson/jobs/Next_CI/workspace/common/ivysettings.xml
  [ivy:resolve] no default ivy user dir defined: set to /home/hudson/.ivy2
  </pre>
  
  <p>Here is my build.xml line:</p>
  
  <pre><code>&lt;property name="ivy.default.ivy.user.dir" value="${basedir}/ivy2" /&gt;
  </code></pre>
  
  <p>I have tried adding this line to common/ivysettings.xml and common/common.xml with no luck.</p>