0

当我尝试从 cassandra source 构建时1.2.5。我收到此错误:

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

maven-ant-tasks-localrepo:

maven-ant-tasks-download:
     [echo] Downloading Maven ANT Tasks...
      [get] Getting: 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] Error getting http://repo2.maven.org/maven2/org/apache/maven/maven-ant-tasks/2.1.3/maven-ant-tasks-2.1.3.jar to /home/sudeep/apache-cassandra-1.2.5-src/build/maven-ant-tasks-2.1.3.jar

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

Total time: 50 seconds
4

2 回答 2

0

你有网络问题。当http://repo2.maven.org在您的浏览器中运行时再试一次。

于 2013-05-29T18:18:35.057 回答
0

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

**<setproxy proxyhost="**.**.**.**"
          proxyport="***"
          nonproxyhosts="*****.com"
          proxyuser="*****"
           proxypassword="****" />**
于 2015-01-07T12:38:58.743 回答