1

我想将 Neo4j 库的 AnormCypher 包含到我在 Eclipse 中的 playframework 项目中,但我卡住了。我正在使用 Windows 8。这些是我正在做的几个步骤;

  • 从 CMD(CommandPrompt) "play new testproject" 创建一个项目
  • 为 Eclipse“testproject eclipse”创建项目文件

  • 正如它提到的这个链接:AnormCypher我正在 创建一个 build.sbt 文件,然后我运行“play compile”。

毕竟在 Eclipse 中我无法访问 org.AnorCypher 库。我找不到添加它的方法。

4

2 回答 2

1

I solved it and i didnt use build.sbt,just edited the Build.scala file and ran the "play compile" command in CMD.

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"

              )    
  )

}
于 2013-04-15T16:12:30.650 回答
0

只需按照 Github 上的说明,“play compile”并重新运行“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
于 2014-02-16T17:28:08.720 回答