Ant构建问题,当我尝试从cassandra源1.2.5构建时。我收到了这个错误

时间:2013-05-29 11:38:50

标签: ant

[root @ SudeepMangu apache-cassandra-1.2.5-src]#ant build build.xml run 构建文件:/home/sudeep/apache-cassandra-1.2.5-src/build.xml

行家-ANT-任务-localrepo:

行家-ANT-任务下载:      [echo]下载Maven ANT任务......       [get]获取:http://repo2.maven.org/maven2/org/apache/maven/maven-ant-tasks/2.1.3/maven-ant-tasks-2.1.3.jar       [get] To:/home/sudeep/apache-cassandra-1.2.5-src/build/maven-ant-tasks-2.1.3.jar       [get]将http://repo2.maven.org/maven2/org/apache/maven/maven-ant-tasks/2.1.3/maven-ant-tasks-2.1.3.jar收到/home/sudeep/apache-cassandra-1.2.5-src/build/maven-ant-tasks-2.1.3.jar

时出错

建立失败 /home/sudeep/apache-cassandra-1.2.5-src/build.xml:266:java.net.UnknownHostException:repo2.maven.org     在java.net.PlainSocketImpl.connect(PlainSocketImpl.java:195)     在java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)     在java.net.Socket.connect(Socket.java:529)     在java.net.Socket.connect(Socket.java:478)     在sun.net.NetworkClient.doConnect(NetworkClient.java:163)     在sun.net.www.http.HttpClient.openServer(HttpClient.java:395)     在sun.net.www.http.HttpClient.openServer(HttpClient.java:530)     在sun.net.www.http.HttpClient。(HttpClient.java:234)     在sun.net.www.http.HttpClient.New(HttpClient.java:307)     在sun.net.www.http.HttpClient.New(HttpClient.java:324)     在sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:970)     在sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:911)     在sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:836)     在org.apache.tools.ant.taskdefs.Get $ GetThread.openConnection(Get.java:660)     在org.apache.tools.ant.taskdefs.Get $ GetThread.get(Get.java:579)     在org.apache.tools.ant.taskdefs.Get $ GetThread.run(Get.java:569)

总时间:50秒

2 个答案:

答案 0 :(得分:0)

您遇到网络问题。当http://repo2.maven.org在您的浏览器中有效时,请再试一次。

答案 1 :(得分:0)

您可以在Build.xml中添加以下设置

**<setproxy proxyhost="**.**.**.**"
          proxyport="***"
          nonproxyhosts="*****.com"
          proxyuser="*****"
           proxypassword="****" />**