I'm using xsbt-web-plugin to create an exploded WAR file of a project containing both Java and Scala sources. The file is src/main/java/conf/application.conf and this is the way I believed would work:
webappWebInfClasses := true
// ...
mappings in (Compile, packageBin) += {
((javaSource in Compile).value / "conf" / "application.conf") -> "conf/application.conf"
}
When using show compile:packageBin::mappings in sbt, I see that the mapping is created correctly, but the file is never copied.
Note that xsbt-web-plugin goes over all of the files and manually copies them since webappWebInfClasses is set to true.
I'm using sbt 0.13.8, xsbt-web-plugin 2.0.2.
It's funny how it takes only a few minutes from putting it to writing to finding the issue. I was looking for the file in the
target/scala-2.11/classesdirectory after runningcompile, when the scope is the WAR file itself.Running
packageand extracting the WAR file showed the file where it was supposed to be.