2012-02-19 27 views
6

Có điều gì sai trong kho lưu trữ, http://teleal.org/m2, trả về không? Đây là build.sbt -file của tôi:SBT không thể tìm thấy trong kho lưu trữ mặc dù tập tin rõ ràng là có

organization := "org.messy" 

name := "mess" 

version := "1-SNAPSHOT" 

scalaVersion := "2.9.1" 

libraryDependencies ++= Seq(
    "org.teleal.cling" % "cling-core" % "1.0.5", 
    "org.teleal.cling" % "cling-support" % "1.0.5" 
) 

resolvers ++= Seq(
    "cling" at "http://teleal.org/m2" 
) 

... và đây là lỗi tôi nhận được. Các teleal.org-URL ở đây có thể được mở trực tiếp trong trình duyệt với bây giờ vấn đề:

> compile 
[info] Updating {file:*************************************************}default-d33f58... 
[warn]  module not found: org.teleal.cling#cling-core;1.0.5 
[warn] ==== local: tried 
[warn] ********************/.ivy2/local/org.teleal.cling/cling-core/1.0.5/ivys/ivy.xml 
[warn] -- artifact org.teleal.cling#cling-core;1.0.5!cling-core.jar: 
[warn] ********************/.ivy2/local/org.teleal.cling/cling-core/1.0.5/jars/cling-core.jar 
[warn] ==== cling: tried 
[warn] http://teleal.org/m2/org/teleal/cling/cling-core/1.0.5/cling-core-1.0.5.pom 
[warn] -- artifact org.teleal.cling#cling-core;1.0.5!cling-core.jar: 
[warn] http://teleal.org/m2/org/teleal/cling/cling-core/1.0.5/cling-core-1.0.5.jar 
[warn] ==== public: tried 
[warn] http://repo1.maven.org/maven2/org/teleal/cling/cling-core/1.0.5/cling-core-1.0.5.pom 
[warn] -- artifact org.teleal.cling#cling-core;1.0.5!cling-core.jar: 
[warn] http://repo1.maven.org/maven2/org/teleal/cling/cling-core/1.0.5/cling-core-1.0.5.jar 
[warn] ==== Scala-Tools Maven2 Repository: tried 
[warn] http://scala-tools.org/repo-releases/org/teleal/cling/cling-core/1.0.5/cling-core-1.0.5.pom 
[warn] -- artifact org.teleal.cling#cling-core;1.0.5!cling-core.jar: 
[warn] http://scala-tools.org/repo-releases/org/teleal/cling/cling-core/1.0.5/cling-core-1.0.5.jar 
[warn]  :::::::::::::::::::::::::::::::::::::::::::::: 
[warn]  ::   UNRESOLVED DEPENDENCIES   :: 
[warn]  :::::::::::::::::::::::::::::::::::::::::::::: 
[warn]  :: org.teleal.cling#cling-core;1.0.5: not found 
[warn]  :::::::::::::::::::::::::::::::::::::::::::::: [error] {file:*************************************************}default-d33f58/*:update: sbt.ResolveException: unresolved dependency: org.teleal.cling#cling-core;1.0.5: not found 
[error] Total time: 4 s, completed Feb 19, 2012 1:44:38 PM 

Cập nhật

Hầu như quên; Tôi đang sử dụng SBT-0.11.0 trên Mac OS X.

Tóm tắt

Các kho teleal.org trả lời cho một yêu cầu đầu từ SBT bằng cách trả lại tình trạng phản ứng 204. Tình trạng phản ứng cần phải có được sự giống như yêu cầu nhận được 200. Vì vậy, sbt kết luận rằng không có gì để xem ở đây.

Nếu teleal.org đã chọn không hỗ trợ yêu cầu head như trung tâm maven, điều này có thể đã hoạt động tốt; nó nghĩ :-)

Ghi chú bên cạnh; sbt sử dụng tiêu đề chấp nhận thú vị này: 'Chấp nhận: văn bản/html, hình ảnh/gif, hình ảnh/jpeg, *; q = .2, /; q = 0,2'

+0

không phải điều này khắc phục được sự cố, nhưng phiên bản mới nhất của sbt là 0.11.2 – OlegYch

Trả lời

5

Để xem debug cấp khai thác gỗ từ nhiệm vụ update:

> set logLevel in update := Level.Debug 
> update 

Ngoài ra, sau khi chạy update, bạn có thể hiển thị các ghi debug, được tồn vào đĩa nhưng không được hiển thị:

> last update 

Bạn sẽ thấy:

[debug]  trying http://teleal.org/m2/org/teleal/cling/cling-core/1.0.5/cling-core-1.0.5.pom 
[debug]   tried http://teleal.org/m2/org/teleal/cling/cling-core/1.0.5/cling-core-1.0.5.pom 
[debug] HTTP response status: 204 url=http://teleal.org/m2/org/teleal/cling/cling-core/1.0.5/cling-core-1.0.5.pom 
[debug]  cling: resource not reachable for org/teleal/cling#cling-core;1.0.5: res=http://teleal.org/m2/org/teleal/cling/cling-core/1.0.5/cling-core-1.0.5.pom 

Các HTTP phản hồi cho URL đó bao gồm chuyển hướng HTTP:

Request URL:http://teleal.org/m2/org/teleal/cling/cling-core/1.0.5/cling-core-1.0.5.pom 
Request Method:GET 
Status Code:302 Found 

Accept:text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 
Accept-Charset:ISO-8859-1,utf-8;q=0.7,*;q=0.3 
Accept-Encoding:gzip,deflate,sdch 
Accept-Language:en-US,en;q=0.8 
Cache-Control:max-age=0 
Connection:keep-alive 
Host:teleal.org 
User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.56 Safari/535.11 

HTTP/1.1 302 Found 
Date: Mon, 20 Feb 2012 10:32:11 GMT 
Server: Jetty() 
Location: http://4thline.org/m2/org/teleal/cling/cling-core/1.0.5/cling-core-1.0.5.pom 
Cache-Control: must-revalidate,no-cache,no-store 
Content-Type: text/html;charset=ISO-8859-1 
Content-Length: 1316 
Connection: close 

Ivy có thể theo dõi chuyển hướng, nhưng hãy sử dụng kho lưu trữ mới trực tiếp để loại bỏ bất kỳ nghi ngờ nào. Vẫn không hoạt động, chúng tôi vẫn gặp lỗi 204.

> set libraryDependencies += "org.teleal.cling" % "cling-core" % "1.0.5" 
[info] Reapplying settings... 
[info] Set current project to default-759082 (in build file:/Users/jason/code/scratch/20120220/) 
> set resolvers += "4thline" at "http://4thline.org/m2" 
> update 
... 
> last update 
... 
[debug]  trying http://4thline.org/m2/org/teleal/cling/cling-core/1.0.5/cling-core-1.0.5.pom 
[debug]   tried http://4thline.org/m2/org/teleal/cling/cling-core/1.0.5/cling-core-1.0.5.pom 
[debug] HTTP response status: 204 url=http://4thline.org/m2/org/teleal/cling/cling-core/1.0.5/cling-core-1.0.5.pom 

Máy chủ đó trả về HTTP 204 (Không có nội dung), nhưng Ivy, kể từ phiên bản 2.2.0, is unable to handle này.

Giải pháp thay thế sẽ là proxy lưu trữ. Các free version of Sonatype Nexus có thể làm điều này, và là khá dễ dàng để thiết lập.

+1

Cảm ơn; xem tóm tắt của tôi ở cuối câu hỏi của tôi. – thoredge

Các vấn đề liên quan