Play Framework 2:可以在构建路径中找到sbt依赖项

时间:2014-08-08 05:38:01

标签: java playframework sbt

这是我的build.sbt

name := """project_name"""

version := "1.0-SNAPSHOT"

lazy val root = (project in file(".")).enablePlugins(PlayJava)

scalaVersion := "2.11.1"

libraryDependencies ++= Seq(
  javaJdbc,
  javaEbean,
  cache,
  javaWs,
  "mysql" % "mysql-connector-java" % "5.1.26",
  "com.alibaba" % "fastjson" % "1.1.21"
)

我正在尝试使用fastjson中的com.alibaba,sbt正确下载:

[info] Updating {file:/activator-1.2.3-minimal/projects/project_name/}root...
[info] Resolving jline#jline;2.11 ...
[info] downloading http://repo1.maven.org/maven2/com/alibaba/fastjson/1.1.21/fastjson-1.1.21.jar ...
[info]  [SUCCESSFUL ] com.alibaba#fastjson;1.1.21!fastjson.jar (14138ms)
[info] Done updating.

但我仍然无法在我的构建路径中找到它,也无法在我的代码中使用它(Eclipse can't find fastjson classess)。

1 个答案:

答案 0 :(得分:0)

如果SBT可以构建它,但是Eclipse不能尝试从SBT重新生成Eclipse项目:http://www.playframework.com/documentation/2.4.x/IDE