Is there something wrong in what the repository, http://teleal.org/m2, returns? This is my build.sbt -file:
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"
)
… and this is the error I get. The teleal.org-URLs here can be opened directly in a browser with now problems:
> 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
Update
Almost forgot; I’m using sbt-0.11.0 on Mac OS X.
Summary
The repository teleal.org replies to a head request from sbt by returning response status 204. The response status should have been the same as the get request 200. So sbt concludes that there’s nothing to see here.
If teleal.org had chosen to not support head request like maven central this would have worked just fine; it think 🙂
Side-note; sbt uses this interesting accept-header: ‘Accept: text/html, image/gif, image/jpeg, *; q=.2, /; q=.2′
To see the debug-level logging from the
updatetask:Alternatively, after running
update, you can display the debug logging, which was persisted to disk but not shown:You’ll see:
The HTTP response for that URL includes a HTTP redirect:
Ivy can follow redirects, but let’s use the new repository directly to eliminate any doubt. Still doesn’t work, we’re still getting the 204 error.
That server is returning a HTTP 204 (No Content), but Ivy, as of version 2.2.0, is unable to handle this.
A workaround would be proxy that repository. The free version of Sonatype Nexus can do this, and is pretty easy to setup.