我希望将Neo4j库的AnormCypher包含在Eclipse中的playframework项目中,但我卡住了。我使用Windows 8.这些是我正在做的几个步骤;
为Eclipse创建项目文件“testproject eclipse”
正如它提到的这个链接:AnormCypher 我正在创建一个build.sbt文件,然后运行“play compile”。
毕竟在eclipse中我无法访问org.AnorCypher库。我无法找到添加它的方法。
答案 0 :(得分:1)
我解决了它并且我没有使用build.sbt,只是编辑了Build.scala文件并在CMD中运行了“play compile”命令。
Build.scala:
import sbt._
import Keys._
import play.Project._
object ApplicationBuild extends Build {
val appName = "project1"
val appVersion = "1.0-SNAPSHOT"
val appDependencies = Seq(
// Add your project dependencies here,
jdbc,
anorm
)
val Repos = Seq(
"anormcypher" at "http://repo.anormcypher.org/",
"Mandubian repository snapshots" at "https://github.com/mandubian/mandubian-mvn/raw/master/snapshots/",
"Mandubian repository releases" at "https://github.com/mandubian/mandubian-mvn/raw/master/releases/"
)
val main = play.Project(appName, appVersion, appDependencies).settings(
// Add your own project settings here
resolvers ++= Repos,
libraryDependencies ++= Seq(
"play" %% "play-json" % "2.2-SNAPSHOT",
"org.anormcypher" %% "anormcypher" % "0.4.0"
)
)
}
答案 1 :(得分:0)
按照Github上的说明,“播放编译”并重新运行“play eclipse”命令。这是我的build.sbt:
name := "myprojectname"
version := "1.0-SNAPSHOT"
resolvers ++= Seq(
"anormcypher" at "http://repo.anormcypher.org/",
"Typesafe Releases" at "http://repo.typesafe.com/typesafe/releases/"
)
libraryDependencies ++= Seq(
jdbc,
anorm,
cache,
"org.anormcypher" %% "anormcypher" % "0.4.4"
)
play.Project.playScalaSettings