I'm trying to use Webjars Bootstrap for Scala Play, and I have a compilation error concerning Webjars itself.
I have followed method in http://www.webjars.org/documentation & also How to use Twitter Bootstrap 2 with play framework 2.x; I am using scala play 2.4.2. My error is:
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)
What I have tried to fix this error:
- Delete & redownload the jar which is in
/home/ubuntu-prod/.ivy2/cache/org.webjars/webjars-play_2.10/jars/webjars-play_2.10-2.4.0-1.jar
- Add other dependencies, following similar issue in class java.lang.RuntimeException/Scala class file does not contain Scala annotation
Mu build.sbt is:
[...]
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"
)
[...]
And my routes are:
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)
Without Webjars, no compilation error...
Is there something to do to fix this issue?
Thanks!