java - Configure Apache Ant to be used behind a proxy -


i trying configure apache ant used behind proxy, using mac os el capitan, , have bash_profile know being sourced terminal, have in bash_profile configure ant proxy:

export ant_opts=-dhttp.proxyhost=myproxyhost -dhttp.proxyport=8080 -dhttp.proxyusername=myproxyusername -dhttp.proxypassword=myproxypassword -dhttps.proxyhost=myproxyhost -dhttps.proxyport=8080 

after open terminal can echo $ant_opts , can see being loaded, when running ant script trying download url indeed picking ant_opts because going thru proxy, every single time getting:

[get] error opening connection java.io.ioexception: server returned http response code: 407 

it tries 3 times , bails out. if remove ant_opts time out error expected.

i know error code telling me credentials incorrect or not provided, have made sure correct, there way proxy credentials should provided ant_opts?, tried -dhttp.proxyusername , -dhttp.proxyuser no avail.

this ant version:

apache ant(tm) version 1.9.7 compiled on april 9 2016 

java version:

java version "1.8.0_66" java(tm) se runtime environment (build 1.8.0_66-b17) java hotspot(tm) 64-bit server vm (build 25.66-b17, mixed mode) 

i believe bash requires ant_opts quoted set:

export ant_opts='-dhttp.proxyhost=myproxyhost -dhttp.proxyport=8080 ...' 

notice single quotes surrounding entire value.


Popular posts from this blog

php - How should I create my API for mobile applications (Needs Authentication) -

5 Reasons to Blog Anonymously (and 5 Reasons Not To)

Google AdWords and AdSense - A Dynamic Small Business Marketing Duo