尝试运行导入的Play项目时出错

时间:2015-03-12 13:44:19

标签: playframework sbt playframework-2.3

我试图运行合作伙伴制作的项目,但是当我运行命令activator run时,我收到了这个输出:

[info] Loading project definition from  /home/user/AndroidStudioProjects/Project/projectproxy-proxy/project
/home/user/AndroidStudioProjects/Project/projectproxy-  proxy/build.sbt:1: error: not found: value sname
sname := "project-proxy"
^
[error] Type error in expression

这是在重新安装播放框架几次之后,之前我收到了像这样的输出:

/home/user/AndroidStudioProjects/Project/project-proxy/build.sbt:12: error: not found: value javaJdbc
javaJdbc,
^
/home/user/AndroidStudioProjects/Project/project-proxy/build.sbt:13: error: not found: value javaEbean
javaEbean,
^
/home/user/AndroidStudioProjects/Project/project-proxy/build.sbt:14: error: not found: value cache
cache,
^
[error] Type error in expression

感谢您的关注

修改:这是我的build.sbt文件:

sname := "project-proxy"

version := "1.0-SNAPSHOT"

resolvers ++= Seq(
  "Typesafe Repository" at   "http://repo.typesafe.com/typesafe/releases/",
  "Sedis repository" at "http://pk11- scratch.googlecode.com/svn/trunk/",
  "jBCrypt Repository" at "http://repo1.maven.org/maven2/org/"
)

libraryDependencies ++= Seq(
  javaJdbc,
  javaEbean,
  cache,
  "com.google.inject" % "guice" % "3.0",
  "log4j" % "log4j" % "1.2.17",
  "org.jboss.resteasy" % "resteasy-jaxrs" % "2.3.7.Final",
  "com.wordnik" % "swagger-core_2.10.0" % "1.2.5",
  "postgresql" % "postgresql" % "9.1-901.jdbc4",
  "org.mindrot" % "jbcrypt" % "0.3m",
  "ws.securesocial" %% "securesocial" % "2.1.4",
  "com.typesafe" %% "play-plugins-redis" % "2.1.1",
  "net.sf.opencsv" % "opencsv" % "2.1"
)

play.Project.playJavaSettings
fork in run := true

这是我的项目/ plugins.sbt:

// Comment to get more information during initialization
logLevel := Level.Warn

// The Typesafe repository
resolvers += "Typesafe repository" at     "http://repo.typesafe.com/typesafe/releases/"

// Use the Play sbt plugin for Play projects
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.2.2")

这是我的project / build.properties文件:

 sbt.version=0.13.0

我忘了提到的一件事是我正在运行Ubuntu 14.10而我的合作伙伴正在运行Windows 8.1。他们正在部署同一个项目并且没有任何问题。

1 个答案:

答案 0 :(得分:1)

问题的解决方案如下:

您应该通过将以下行添加到顶级项目/ plugins.sbt来将播放插件添加到sbt:

ssh