蚂蚁GET任务和代理 [英] Ant GET task and proxy
问题描述
如何使用<一个href=\"http://webcache.googleusercontent.com/search?q=cache%3agEPrUXO8CvoJ%3aant.apache.org/manual/Tasks/get.html+ant+get&cd=1&hl=en&ct=clnk&client=firefox-a&source=www.google.com\"相对=nofollow>蚂蚁与代理GET任务?
我只看到有用户名和密码,但没有代理主机:(
I only see there username and password, but there is no proxy host :(
推荐答案
在 GET
任务文档是:
The key bit in the get
task docs is:
代理。由于Apache Ant的1.7.0,蚂蚁
在Java1.5的运行或更高版本可以使用
操作的代理服务器设置
如果系统的启用-autoproxy
选项。还有一个'setproxy'
任务早期的Java版本。同
代理开启,请求
对本地主机可能无法正常工作
预期,如果请求被中继到
代理服务器。
Proxies. Since Apache Ant 1.7.0, Ant running on Java1.5 or later can use the proxy settings of the operating system if enabled with the -autoproxy option. There is also the 'setproxy' task for earlier Java versions. With proxies turned on, requests against localhost may not work as expected, if the request is relayed to the proxy.
所以,你可以使用 setproxy
对于老版本的Ant任务,或见代理配置的文档
So you can use the setproxy
task for older versions of Ant, or see the docs on proxy config:
<setproxy proxyhost="firewall" proxyport="81"/>
的(即 GET
任务的用户名和密码属性对远程系统,而不是中间代理。)的
(The username and password attributes of the get
task are for the remote system, not for intermediate proxies.)
这篇关于蚂蚁GET任务和代理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!