我在玩一个游戏!应用程序使用Neo4j库。 Neo4j工作正常,但我正在尝试使用嵌入式数据库(following this tutorial)设置服务器(包括Web管理)。
我的依赖关系是:
val appDependencies = Seq(
"org.neo4j" % "neo4j" % "1.8.M06",
"org.neo4j.app" % "neo4j-server" % "1.8.M06",
"org.neo4j.app" % "neo4j-server" % "1.8.M06" classifier "static-web",
"com.sun.jersey" % "jersey-core" % "1.9"
)
但是,当我运行update
命令时,neo4j-server-1.8.M06.jar
丢失了。不知何故,sbt获取所有jar和pom文件以获取此依赖项:
[info] Updating [...]...
[...]
[info] downloading http://repo.typesafe.com/typesafe/releases/org/neo4j/neo4j/1.8.M06/neo4j-1.8.M06.pom ...
[info] [SUCCESSFUL ] org.neo4j#neo4j;1.8.M06!neo4j.pom (758ms)
[info] downloading http://repo.typesafe.com/typesafe/releases/org/neo4j/app/neo4j-server/1.8.M06/neo4j-server-1.8.M06-static-web.jar ...
[info] [SUCCESSFUL ] org.neo4j.app#neo4j-server;1.8.M06!neo4j-server.jar (3678ms)
[info] downloading http://repo.typesafe.com/typesafe/releases/com/sun/jersey/jersey-core/1.9/jersey-core-1.9.jar ...
[info] [SUCCESSFUL ] com.sun.jersey#jersey-core;1.9!jersey-core.jar(bundle) (941ms)
[info] downloading http://repo.typesafe.com/typesafe/releases/org/neo4j/neo4j-kernel/1.8.M06/neo4j-kernel-1.8.M06.jar ...
[...]
如何告诉sbt获取所需的jar文件?添加withSources()
并没有解决这个问题。
答案 0 :(得分:3)
我终于使用了以下依赖项:
val appDependencies = Seq(
"org.neo4j" % "neo4j" % "1.8.M06",
"org.neo4j.app" % "neo4j-server" % "1.8.M06" classifier "static-web" classifier "",
"com.sun.jersey" % "jersey-core" % "1.9"
)
关键是空classifier ""
...
答案 1 :(得分:1)
通过指定人工制品的确切位置来尝试此操作:
val appDependencies = Seq(
"org.neo4j" % "neo4j" % "1.8.M06",
"org.neo4j.app" % "neo4j-server" % "1.8.M06" from "http://m2.neo4j.org/content/repositories/releases/org/neo4j/app/neo4j-server/1.8.M06/neo4j-server-1.8.M06.jar",
"org.neo4j.app" % "neo4j-server" % "1.8.M06" classifier "static-web" from "http://m2.neo4j.org/content/repositories/releases/org/neo4j/app/neo4j-server/1.8.M06/neo4j-server-1.8.M06-static-web.jar",
"com.sun.jersey" % "jersey-core" % "1.9"
)