【发布时间】:2014-12-17 11:00:46
【问题描述】:
我正在尝试通过 sbt 添加 blueprints-sail-graph (located here) 依赖项,但它无法解决 sail 依赖项之一。我是 Java/Scala 开发的新手,非常感谢您的帮助!以下是我的build.sbt文件:
scalaVersion := "2.10.3"
libraryDependencies ++= Seq(
"org.scalatest" % "scalatest_2.10" % "2.0" % "test" withSources() withJavadoc(),
"org.scalacheck" %% "scalacheck" % "1.10.0" % "test" withSources() withJavadoc(),
"com.tinkerpop.blueprints" % "blueprints-rexster-graph" % "2.6.0" withSources() withJavadoc(),
"com.tinkerpop.blueprints" % "blueprints-sail-graph" % "2.5.0"
)
unmanagedBase := baseDirectory.value / "lib"
resolvers += "Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots"
resolvers += "Scala-Tools Maven2 Snapshots Repository" at "http://scala-tools.org/repo-snapshots"
resolvers += "Local Maven Repository" at "file://"+Path.userHome.absolutePath+"/.m2/repository"
resolvers += "JBoss repository" at "https://repository.jboss.org/nexus/content/repositories/"
我从 sbt 得到的错误是:
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: org.restlet.jse#org.restlet;2.1.1: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[trace] Stack trace suppressed: run 'last *:update' for the full output.
[error] (*:update) sbt.ResolveException: unresolved dependency: org.restlet.jse#org.restlet;2.1.1: not found
此错误消息上方的警告是:
[info] Resolving org.restlet.jse#org.restlet;2.1.1 ...
[warn] module not found: org.restlet.jse#org.restlet;2.1.1
[warn] ==== local: tried
[warn] /home/d2b2/.ivy2/local/org.restlet.jse/org.restlet/2.1.1/ivys/ivy.xml
[warn] ==== public: tried
[warn] http://repo1.maven.org/maven2/org/restlet/jse/org.restlet/2.1.1/org.restlet-2.1.1.pom
[warn] ==== Sonatype OSS Snapshots: tried
[warn] https://oss.sonatype.org/content/repositories/snapshots/org/restlet/jse/org.restlet/2.1.1/org.restlet-2.1.1.pom
[warn] ==== Scala-Tools Maven2 Snapshots Repository: tried
[warn] http://scala-tools.org/repo-snapshots/org/restlet/jse/org.restlet/2.1.1/org.restlet-2.1.1.pom
[warn] ==== Local Maven Repository: tried
[warn] file:///home/d2b2/.m2/repository/org/restlet/jse/org.restlet/2.1.1/org.restlet-2.1.1.pom
[warn] ==== JBoss repository: tried
[warn] https://repository.jboss.org/nexus/content/repositories/org/restlet/jse/org.restlet/2.1.1/org.restlet-2.1.1.pom
我知道 sail 依赖是问题,因为如果我删除它,sbt 编译没有问题。我添加了额外的解析器,希望其中一个包含这个 jar - 事实上JBoss 似乎是,但由于某种原因它仍然不起作用。我还尝试了许多不同版本的blueprints-sail-graph,但均未成功。我不知道还能做什么,请帮我解决这个依赖问题。
感谢大家的帮助!
编辑:根据另一个post,这个罐子需要专门添加到常春藤——希望能节省一些时间。我用 Ivy 尝试了一些东西,但没有成功:(
【问题讨论】:
-
将您的编辑作为问题的答案,并在几天后接受。这样,如果有人偶然发现这个问题,他/她就会看到答案。
-
我真的不认为这是一个答案——我的问题没有解决。
-
在你提到的帖子中,没有提到手动添加jar文件,它只是添加一个包含所需工件的存储库。
标签: scala sbt dependency-management restlet-2.0