我在sbt-aspectj 2.1.5使用Play Framework插件。
当我点击刷新时,包括javascript文件在内的所有资源都不会自动重新加载 - 我需要重新启动服务器才能获得预期的结果。
似乎我在构建中遗漏了一些东西,但却无法真正找到它可能是什么,因此也就是问题。
这是plugins.sbt
档案:
// Used to weave Logger around controller methods
addSbtPlugin("com.typesafe.sbt" % "sbt-aspectj" % "0.9.4")
Build.scala
档案:
import com.typesafe.sbt.SbtAspectj.AspectjKeys.inputs
import com.typesafe.sbt.SbtAspectj.{Aspectj, aspectjSettings, compiledClasses}
import play.Project._
import sbt.Keys._
import sbt._
object Build extends Build {
val appName = "frontend"
val appVersion = "1.0-SNAPSHOT"
val frontEndAppDependencies = Seq(
javaCore,
"org.slf4j" % "slf4j-api" % "1.6.6",
"be.objectify" %% "deadbolt-java" % "2.1-RC2",
"com.typesafe.akka" %% "akka-quartz-scheduler" % "1.2.0-akka-2.1.x",
"com.fasterxml.jackson.core" % "jackson-core" % "2.2.0",
"com.fasterxml.jackson.core" % "jackson-databind" % "2.2.0",
"org.apache.directory.studio" % "org.apache.commons.io" % "2.4",
"org.apache.poi" % "poi-ooxml" % "3.9"
)
val main = play.Project(appName, appVersion, frontEndAppDependencies).settings(
resolvers += Resolver.mavenLocal,
lessEntryPoints <<= baseDirectory(_ / "app" / "assets" / "stylesheets" ** "main.less"),
coffeescriptOptions := Seq("bare")
)
// todo : activate aspectj before release to enable log filters ; this configuration is deactivated because of the resources auto reloading bug
.settings(aspectjSettings: _*).settings(inputs in Aspectj <+= compiledClasses,
products in Compile <<= products in Aspectj,
products in Runtime <<= products in Compile
)
}