play2-scalate publish-local error
Я пытаюсь использовать плагин play2-scalate ( https://github.com/adetante/play2-scalate) для использования шаблонов Jade в моем приложении Play Framework, но обнаружил ошибку при попытке запустить 'play publish-local',
Перед тем, как подать проблему, я подумал, что я должен проверить здесь, чтобы выяснить, может ли быть легкое исправление (я новичок в Play/Scala/Scalate). Заранее благодарим за любую помощь, которую вы можете предоставить.
Версии: Play 2.1-RC1, sbt 0.12.0, scala-2.10.0
инструкции должны быть запущены play > publish-local
в каталоге проекта-ядра, и вот ошибка, которую я получаю:
[info] Generating Scala API documentation for main sources to /tools/play2-scalate/project-code/target/scala-2.10/api...
[error] /tools/play2-scalate/project-code/app/controllers/Template.scala:21: not enough arguments for constructor TemplateEngine: (sourceDirectories: Traversable[java.io.File], mode: String)org.fusesource.scalate.TemplateEngine
[error] /tools/play2-scalate/project-code/app/controllers/Template.scala:21: not enough arguments for constructor TemplateEngine: (sourceDirectories: Traversable[java.io.File], mode: String)org.fusesource.scalate.TemplateEngine
[error] val engine:TemplateEngine=new TemplateEngine()
[error] val engine:TemplateEngine=new TemplateEngine()
[error] ^
[error] ^
[info] No documentation generated with unsucessful compiler run
[error] one error found
[error] one error found
[error] (compile:doc) Scaladoc generation failed
Похоже, что это не на этапе создания документации; Я не уверен, как обойти это. Любой совет приветствуется. Спасибо!
1 ответ
Похоже, что существует двоичная несовместимость с библиотеками, созданными с помощью scala 2.9 и 2.10 относительно параметров по умолчанию; см.: Scala 2.10.0 RC2 и дополнительные параметры
Решение было изменить project-code/project/Build.scala
установить масштабную зависимость "scalate-core_2.10" % "1.6.1"
в результате чего:
object ApplicationBuild extends Build {
val appName = "play2-scalate"
val appVersion = "0.1-SNAPSHOT"
val appDependencies = Seq(
"org.fusesource.scalate" % "scalate-core_2.10" % "1.6.1"
)
val main = PlayProject(appName, appVersion, appDependencies, mainLang = SCALA).settings(
)
}
Были и другие изменения в /project
файлы, которые нужно было сделать:
/project-code/project/build.properties
-sbt.version=0.11.2
+sbt.version=0.12.2
/project-code/project/plugins.sbt
// Use the Play sbt plugin for Play projects
-addSbtPlugin("play" % "sbt-plugin" % "2.0.1")
+addSbtPlugin("play" % "sbt-plugin" % "2.1.0")
Надеюсь это поможет.