0

我正在拍戏!使用 Neo4j 库的应用程序。Neo4j 工作正常,但我正在尝试使用嵌入式数据库设置服务器(包括 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 为这个依赖项获取所有 jars 和 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()并没有解决这个问题。

4

2 回答 2

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 ""...

于 2012-07-31T10:24:58.670 回答
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"
)
于 2012-07-31T09:44:00.807 回答