【发布时间】:2015-03-12 01:31:06
【问题描述】:
我正在使用 PlayFramework (v2.3.8) 及其插件 play-authenticate (v0.6.8) 实现一组后端 RESTful 服务,并希望找到一种更简单的方法在 eclipse 中附加其源代码调试(游戏框架和我使用的任何其他依赖项)。
要下载源代码,我将 withSources() 添加到 build.sbt(用于依赖项)和 plugin.sbt(对于 sbt play 插件),但是这并没有给我带来 playframework 的所有源代码(即,我仍然需要一一添加框架的每个模块的源代码 - 参见下面的 build.sbt 示例),当我使用 activator eclipse 时,它不会将它们自动包含在类路径中,这意味着我必须为调试器在类路径中找不到的每个已编译类手动“附加源”。
有什么方法可以让这个过程更简单,自动将所有源代码 jar 添加到项目的类路径中,并让 eclipse 在调试时自动附加这些源?
我的 build.sbt
libraryDependencies ++= Seq(
javaJdbc,
javaEbean,
cache,
javaWs,
"com.feth" %% "play-authenticate" % "0.6.8" withSources(),
"com.typesafe.play" % "play_2.11" % "2.3.7" withSources(), // how to download all play-framework module source code at once?
"com.typesafe.play" % "play-java_2.11" % "2.3.8" withSources(), // how to download all play-framework module source code at once?
"org.springframework" % "spring-context" % "4.0.3.RELEASE" withSources() // how to download all dependencies source code at once?
)
我的 plugins.sbt
resolvers += "Typesafe repository" at "https://repo.typesafe.com/typesafe/releases/"
// The Play plugin
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.3.8" withSources() withJavadoc())
// web plugins
addSbtPlugin("com.typesafe.sbt" % "sbt-coffeescript" % "1.0.0")
addSbtPlugin("com.typesafe.sbt" % "sbt-less" % "1.0.0")
addSbtPlugin("com.typesafe.sbt" % "sbt-jshint" % "1.0.1")
addSbtPlugin("com.typesafe.sbt" % "sbt-rjs" % "1.0.1")
addSbtPlugin("com.typesafe.sbt" % "sbt-digest" % "1.0.0")
addSbtPlugin("com.typesafe.sbt" % "sbt-mocha" % "1.0.0")
【问题讨论】:
标签: java eclipse playframework