java - Issue with proxy while running Ant script -


i'm developing ant script project purposes , figured out proxy causes problem me. here simplest example apache documentation of 'copy' task:

=================== build.xml ===================== <project default="simplestcopy">     <property name="test.dir" value="${basedir}/test/" />      <target name="simplestcopy">         <mkdir dir="${test.dir}" />         <copy todir="${test.dir}" flatten="true">             <resources>                 <url url="http://ant.apache.org/index.html"/>             </resources>         </copy>     </target> </project> 

i've got next error:

d:\temp>ant buildfile: d:\temp\build.xml  simplestcopy: java.net.connectexception: connection refused: connect  build failed d:\temp\build.xml:7: warning: not find resource url "http://ant.apache.org/index.html" copy. 

i've tried set kind of

<property name="java.net.usesystemproxies" value="true" /> 

and define property in command line

d:\temp>ant -djava.net.usesystemproxies=true -verbose 

but got same error:

d:\temp>ant -djava.net.usesystemproxies=true -verbose apache ant version 1.8.1 compiled on april 30 2010 trying default build file: build.xml buildfile: d:\temp\build.xml detected java version: 1.6 in: c:\programfiles\java\jdk1.6.0_24\jre detected os: windows xp parsing buildfile d:\temp\build.xml uri = file:/d:/temp/build.xml project base dir set to: d:\temp parsing buildfile jar:file:/c:/programfiles/java/apache-ant-1.8.1/lib/ant.jar!/org/apache/tools/ant/antlib.xml uri = jar:file:/c:/programfiles/java/apache-ant-1.8.1/lib/ant.jar!/org/apache/tools/ant/antlib.xml zip file build sequence target(s) `simplestcopy' [simplestcopy] complete build sequence [simplestcopy, ]  simplestcopy:     [mkdir] skipping d:\temp\test because exists. java.net.connectexception: connection refused: connect  build failed d:\temp\build.xml:7: warning: not find resource url "http://ant.apache.org/index.html" copy.         @ org.apache.tools.ant.taskdefs.copy.execute(copy.java:487)         @ org.apache.tools.ant.unknownelement.execute(unknownelement.java:291)         @ sun.reflect.nativemethodaccessorimpl.invoke0(native method)         @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:39)         @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:25)         @ java.lang.reflect.method.invoke(method.java:597)         @ org.apache.tools.ant.dispatch.dispatchutils.execute(dispatchutils.java:106)         @ org.apache.tools.ant.task.perform(task.java:348)         @ org.apache.tools.ant.target.execute(target.java:390)         @ org.apache.tools.ant.target.performtasks(target.java:411)         @ org.apache.tools.ant.project.executesortedtargets(project.java:1397)         @ org.apache.tools.ant.project.executetarget(project.java:1366)         @ org.apache.tools.ant.helper.defaultexecutor.executetargets(defaultexecutor.java:41)         @ org.apache.tools.ant.project.executetargets(project.java:1249)         @ org.apache.tools.ant.main.runbuild(main.java:801)         @ org.apache.tools.ant.main.startant(main.java:218)         @ org.apache.tools.ant.launch.launcher.run(launcher.java:280)         @ org.apache.tools.ant.launch.launcher.main(launcher.java:109)  total time: 1 second 

any ideas how fix?
help...

use setproxy task: http://ant.apache.org/manual/tasks/setproxy.html


Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -