title: set up proxy with ANT
body: <p>Java version: 1.8.0
  ant version: 1.7.1</p>
  
  <p>I am trying to execute this ant to build jar file. This ant also does http connection to maven to download some jar files:</p>
  
  <p>Since I am behind proxy, I do this first:</p>
  
  <pre><code>export ANT_OPTS="-Dhttp.proxyHost=prod.proxy.net -Dhttp.proxyPort=8080 -Dhttp.proxyUsername=smithJ -Dhttp.proxyPassword=Basketball123"
  </code></pre>
  
  <p>then I execute this:</p>
  
  <pre><code>CLASSPATH=/app/hbase-0.94.27/lib/hadoop-core-1.0.4.jar CFLAGS=-m64 CXXFLAGS=-m64 ant -v compile-native tar
  </code></pre>
  
  <p>I get these errors:</p>
  
  <pre><code>ivy-download:
        [get] Getting: http://repo2.maven.org/maven2/org/apache/ivy/ivy/2.2.0/ivy-2.2.0.jar
        [get] To: /app/hadoop-lzo/ivy/ivy-2.2.0.jar
        [get] Error opening connection java.io.IOException: Server returned HTTP response code: 407 for URL: http://repo2.maven.org/maven2/org/apache/ivy/ivy/2.2.0/ivy-2.2.0.jar
        [get] Error opening connection java.io.IOException: Server returned HTTP response code: 407 for URL: http://repo2.maven.org/maven2/org/apache/ivy/ivy/2.2.0/ivy-2.2.0.jar
        [get] Error opening connection java.io.IOException: Server returned HTTP response code: 407 for URL: http://repo2.maven.org/maven2/org/apache/ivy/ivy/2.2.0/ivy-2.2.0.jar
        [get] Can't get http://repo2.maven.org/maven2/org/apache/ivy/ivy/2.2.0/ivy-2.2.0.jar to /app/hadoop-lzo/ivy/ivy-2.2.0.jar
  </code></pre>
  
  <p>407 errors are proxy authentication errors. What am I doing wrong here? How would I authenticate in proxy to get http files?</p>
  
  <p>I also tried this:</p>
  
  <pre><code> CLASSPATH=/app/hbase-0.94.27/lib/hadoop-core-1.0.4.jar CFLAGS=-m64 CXXFLAGS=-m64 ant -Dhttp.proxyHost=prod.proxy.net -Dhttp.proxyPort=8080 -Dhttp.proxyUsername=smithJ -Dhttp.proxyPassword=Basketball123  compile-native tar
  </code></pre>
  
  <p>still 407 errors.</p>