我正在使用RESTful (v2.3.8)及其插件播放认证 (v0.6.8)实现一组后端PlayFramework服务,并希望找到一种更简单的方法,将源代码附加到eclipse中进行调试(无论是运行框架还是我使用的任何其他依赖项)。
为了下载源代码,我将withSources()添加到 build.sbt (用于依赖项)和plugin.sbt (用于sbt play插件),但是这并不能为我带来所有的游戏框架源代码(也就是说,我仍然需要一个接一个地添加框架每个模块的源代码-参见下面的build.sbt示例),并且当我使用激活器eclipse时,它不会自动将它们包含在类路径中。这意味着,对于调试器在类路径中找不到的每个已编译类,我必须手动“附加源”。
有没有办法使这个过程更容易,自动将所有源代码jars添加到项目的类路径,并使eclipse在调试时自动附加这些源代码?
my 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?
)my 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")发布于 2015-04-01 07:55:21
你需要设置旗子。根据文档https://www.playframework.com/documentation/2.3.x/IDE,使用-source=true激活
https://stackoverflow.com/questions/29000472
复制相似问题