java - how do you download files via ant though proxy -


this question has answer here:

i using ant uses build.xml file. command:

java version : 1.8.0 ant version: 1.7.1

classpath=/app/hbase-0.94.27/lib/hadoop-core-1.0.4.jar cflags=-m64 cxxflags=-m64 ant compile-native tar 

it hangs here:

buildfile: build.xml  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 

i connection time out error:

build failed java.net.connectexception: connection timed out         @ java.net.plainsocketimpl.socketconnect(native method)         @ java.net.abstractplainsocketimpl.doconnect(abstractplainsocketimpl.java:345)         @ java.net.abstractplainsocketimpl.connecttoaddress(abstractplainsocketimpl.java:206)         @ java.net.abstractplainsocketimpl.connect(abstractplainsocketimpl.java:188)         @ java.net.sockssocketimpl.connect(sockssocketimpl.java:392) 

ant make call files maven repository, part of build.xml file this:

<property name="ivy.dir" location="ivy" />   <loadproperties srcfile="${ivy.dir}/libraries.properties"/>   <property name="ivy.jar" location="${ivy.dir}/ivy-${ivy.version}.jar"/>   <property name="ivy_repo_url" value="http://repo2.maven.org/maven2/org/apache/ivy/ivy/${ivy.version}/ivy-${ivy.version}.jar"/>   <property name="ivysettings.xml" location="${ivy.dir}/ivysettings.xml" />   <property name="ivy.org" value="com.hadoop.compression"/>   <property name="build.dir" location="build" />   <property name="dist.dir" value="${build.dir}/${final.name}"/>   <property name="build.ivy.dir" location="${build.dir}/ivy" />   <property name="build.ivy.lib.dir" location="${build.ivy.dir}/lib" /> 

i've placed these lines build.xml file:

   <target name="probe-proxy" depends="init">         <condition property="proxy.enabled">           <and>             <isset property="192.168.101.1"/>             <isreachable host="${proxy.host}"/>           </and>         </condition>       </target>    <target name="proxy" depends="probe-proxy" if="proxy.enabled">     <property name="proxy.port" value="8080"/>     <property name="proxy.user" value="smithj"/>     <property name="proxy.pass" value="basketball123"/>     <setproxy proxyhost="${proxy.host}" proxyport="${proxy.port}"       proxyuser="${proxy.user}" proxypassword="${proxy.pass}"/>   </target> 

still ant connection maven jar files via http hanging. doing right? thanks.

you're mixing technologies. ant not use "settings.xml" files, configuration file maven.

i suggest looking @ ant documentation on how configure proxies

https://ant.apache.org/manual/proxy.html


Comments

Popular posts from this blog

facebook - android ACTION_SEND to share with specific application only -

python - Creating a new virtualenv gives a permissions error -

javascript - cocos2d-js draw circle not instantly -