我正在尝试使用Webjars Bootstrap进行Scala Play,我有关于Webjars本身的编译错误。
我已按照http://www.webjars.org/documentation& How to use Twitter Bootstrap 2 with play framework 2.x;我正在使用scala play 2.4.2。我的错误是:
Compilation error
error while loading WebJarAssets, class file
'/home/ubuntu-prod/.ivy2/cache/org.webjars/webjars-play_2.10/jars/webjars-play_2.10-2.4.0-1.jar(controllers/WebJarAssets.class)'
is broken (class java.lang.RuntimeException/Scala class file does not contain Scala annotation)
我试图修复此错误:
/home/ubuntu-prod/.ivy2/cache/org.webjars/webjars-play_2.10/jars/webjars-play_2.10-2.4.0-1.jar
Mu build.sbt是:
[...]
libraryDependencies ++= Seq(
"org.scalatest" %% "scalatest" % "2.2.4" % "test",
"org.webjars" %% "webjars-play" % "2.4.0-1",
"org.webjars" % "bootstrap" % "3.1.1-2",
"org.webjars" % "bootswatch-cerulean" % "3.3.1+2",
"org.webjars" % "html5shiv" % "3.7.0",
"org.webjars" % "respond" % "1.4.2"
)
[...]
我的路线是:
GET / controllers.Application.index
# Map static resources from the /public folder to the /assets URL path
GET /assets/*file controllers.Assets.at(path="/public", file)
GET /webjars/*file controllers.WebJarAssets.at(file)
没有Webjars,没有编译错误......
有什么办法可以解决这个问题吗?
谢谢!
答案 0 :(得分:0)
通过规避它来解决我的问题。如果有人遇到同样的问题,请尝试:
请注意,对于游戏2.4.2,您不应该使用" routesGenerator := InjectedRoutesGenerator
"在build.sbt
无论如何,如果有人对破碎的罐子有所了解,我仍然感兴趣!
干杯