mercredi 11 mars 2015

What's the best way of attaching playframework sources for debugging in Eclipse IDE



I am implementing a set of backend RESTful services using the PlayFramework (v2.3.8) and its plugin play-authenticate (v0.6.8), and would like to find an easier way of attaching their source code in eclipse for debugging (both of playframework and of whatever other dependency I use).


To download sources, I am adding withSources() both to the build.sbt (for dependencies) and to plugin.sbt (for the sbt play plugin), however this doesn't bring me all the source code of playframework (i.e., I still need to add the source code of each module of the framework one by one - see the build.sbt example below), and it does not include them automatically on the classpath when I use activator eclipse, which means I have to manually "Attach source" for each compiled class the debugger doesn't find in the classpath.


Is there any way of making this process easier, automatically adding all source code jars to the project's classpath, and making eclipse to automatically attach these sources when debugging?


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 "http://ift.tt/UfztAe"

// 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")



Aucun commentaire:

Enregistrer un commentaire