我只是想試試Spray庫,但是由於maven的依賴性,無法執行它的示例。無法執行噴霧示例| Maven依賴關係錯誤
如在文檔提供我已經定義了噴霧庫如下:
<repositories>
<repository>
<id>sprayrepo</id>
<name>spray repo</name>
<url>http://repo.spray.io/</url>
<layout>default</layout>
</repository>
</repositories>
然後如下我定義的依賴:
<dependency>
<groupId>io.spray</groupId>
<artifactId>spray-http</artifactId>
<version>1.1-M7</version>
</dependency>
<dependency>
<groupId>io.spray</groupId>
<artifactId>spray-httpx</artifactId>
<version>1.1-M7</version>
</dependency>
<dependency>
<groupId>io.spray</groupId>
<artifactId>spray-util</artifactId>
<version>1.1-M7</version>
</dependency>
<dependency>
<groupId>com.chuusai</groupId>
<artifactId>shapeless_2.9.2</artifactId>
<version>1.2.0</version>
</dependency>
</dependencies>
然而,當我嘗試執行到Maven安裝,我面對以下錯誤:
[ERROR] Failed to execute goal on project spray-test1: Could not resolve dependencies for project org.spray:spray-test1:jar:1.0-SNAPSHOT: Failed to collect dependencies for [io.spray:spray-http:jar:1.1-M7 (compile), io.spray:spray-httpx:jar:1.1-M7 (compile), io.spray:spray-util:jar:1.1-M7 (compile), com.chuusai:shapeless_2.9.2:jar:1.2.0 (compile)]: Failed to read artifact descriptor for io.spray:spray-http:jar:1.1-M7: Could not transfer artifact io.spray:spray-http:pom:1.1-M7 from/to sprayrepo (http://repo.spray.io/): connection timed out to http://repo.spray.io/io/spray/spray-http/1.1-M7/spray-http-1.1-M7.pom -> [Help 1] [ERROR]
任何指針或建議將高度讚賞ated。
感謝
這裏沒有問題,下載http://repo.spray.io/io/spray/spray-http/1.1-M7/spray-http-1.1- M7.pom – 2013-03-18 08:46:58
@BGR感謝您的輸入,但我可以從我的瀏覽器瀏覽存儲庫沒有任何問題,只有當我執行mvn install命令時纔會出現此問題。 – 2013-03-18 11:46:18
您的瀏覽器是通過HTTP代理服務器進行的嗎? – 2013-03-18 13:47:52