我正在使用提供的make文件安裝軟件(Apache Thrift)。當我每運行指南進行,我得到:Maven,Ant(或Apache Thrift)在make期間超時。在哪裏放置代理設置?
Buildfile: /home/john/thrift/lib/java/build.xml
setup.init:
mvn.ant.tasks.check:
proxy:
mvn.ant.tasks.download:
[get] Getting: http://repo1.maven.org/maven2/org/apache/maven/maven-ant-tasks/2.1.3/maven-ant-tasks-2.1.3.jar
[get] To: /home/john/thrift/lib/java/build/tools/maven-ant-tasks-2.1.3.jar
mvn.init:
[artifact:dependencies] [WARNING] Overriding profile: 'maven-ant-tasks-repo-profile' (source: pom) with new instance from source: pom
[artifact:dependencies] Downloading: org/slf4j/slf4j-api/1.7.12/slf4j-api-1.7.12.pom from repository central at http://repo1.maven.org/maven2
[artifact:dependencies] Error transferring file: Connection timed out
它肯定看起來像代理問題,所以我在行家的conf文件/usr/share/maven2/conf/settings.xml
配置我的代理設置。當未仍能正常工作,從終端,我
export ANT_OPTS="-Dhttp.proxyHost=[MyProxyName] -Dhttp.proxyPort=[MyProxyPort] -Dhttps.proxyHost=[MyProxyName] -Dhttps.proxyPort=[MyProxyPort]"
,並再次運行make
。這次我過去了mvn.ant.tasks.download
以上的行,但是mvn.init
超時了。
什麼是設置代理設置的適當位置,以便Maven和Ant可以獲取這些設置?或者也許在Thrift配置文件,.pom文件或類似的東西中指定這些設置?提前致謝!