【问题标题】:Play framework 2.5 not compiling source files (inside app folder)播放框架 2.5 不编译源文件(在 app 文件夹内)
【发布时间】:2016-11-03 14:46:48
【问题描述】:

我们有一个 Play 项目,其文件夹结构在链接 https://www.playframework.com/documentation/2.5.x/Anatomy 中给出。

我们在plugins.sbtbuild.sbt 中有addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.5.2"),我们添加了以下行,

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

当我们给出compile 命令(通过激活器)时,项目从build.sbt 加载依赖jar,但目标文件夹中没有生成.classes 文件。

谁能帮我们解决这个问题?

【问题讨论】:

  • 你是用activator创建的项目,还是手工组装的?

标签: playframework-2.5


【解决方案1】:

我们通过在 build.sbt 文件中添加以下行解决了这个问题,

编译中的javaSource := baseDirectory.value / "app"

添加后,“app”文件夹中的 .java 文件和 .scala 文件将被编译。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2012-05-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-07-17
    • 1970-01-01
    相关资源
    最近更新 更多