Playframework 2.0 SBT已将Emacs临时文件添加到managedSources

Playframework 2.0 SBT已将Emacs临时文件添加到managedSources,playframework-2.0,sbt,Playframework 2.0,Sbt,我正在使用Scala学习Play 2框架的教程,在尝试编译时遇到以下错误: [playProducts] $ compile [trace] Stack trace suppressed: run last compile:managedSources for the full output. [error] (compile:managedSources) java.io.FileNotFoundException: /Users/peterbecich/scala/playProducts/

我正在使用Scala学习Play 2框架的教程,在尝试编译时遇到以下错误:

[playProducts] $ compile
[trace] Stack trace suppressed: run last compile:managedSources for the full output.
[error] (compile:managedSources) java.io.FileNotFoundException:
/Users/peterbecich/scala/playProducts/app/views/tags/.#barcode.scala.html
(No such file or directory)
“托管源”列表不可见

[playProducts] $ show managedSources
[trace] Stack trace suppressed: run last compile:managedSources for the full output.
[error] (compile:managedSources) java.io.FileNotFoundException:
/Users/peterbecich/scala/playProducts/app/views/tags/.#barcode.scala.html (No such file or directory)
非托管源是可查看的,不列出临时文件

[playProducts] $ show unmanagedSources
[info] ArrayBuffer(/Users/peterbecich/scala/playProducts/app/controllers/Application.scala, /Users/peterbecich/scala/playProducts/app/controllers/Barcodes.scala, /Users/peterbecich/scala/playProducts/app/controllers/Products.scala, /Users/peterbecich/scala/playProducts/app/models/Product.scala)
解决方案是否类似于在build.sbt中包含类似的内容?这并没有解决它,而且显然不是所有临时文件的解决方案。可以在SBT配置文件中使用正则表达式吗

excludeFilter in managedSources := ".#barcode.scala.html"
我在Mavericks上使用OracleJDK8。我应该降级到JDK 6还是JDK 7? SBT为0.13.5,Play为2.2.3,Scala为2.10.3

以下是完整的编译错误:


谢谢你的反馈

不幸的是,在游戏2.2.x中没有什么可以做的。。。以下是查找所有模板的代码:

  sourceDirectories.foreach { sourceDirectory =>
    (sourceDirectory ** "*.scala.*").get.collect(templateExt).foreach {
它没有提供任何机会来过滤:(

但是,在Play 2.3中,我们已经重写了模板编译器的SBT部分(现在称为Twirl),现在可以正确定位源文件(即使用标准SBT机制),因此您可以:

excludeFilter in TwirlKeys.compileTemplates := ".#*"

尽管这实际上甚至不是必需的,因为默认的排除过滤器排除所有隐藏文件,其中包括emacs文件,因为它们以

开头,奇怪的是,退出emacs修复了
sbt编译

我在使用Emacs插件Ensime,如果这有什么关系的话

sbt clean
无法解决问题,也无法删除所有目标目录,如下所示: