adding eclipse support to play2
Hi Heiko,
steps:
1) add a taskKey and task for eclipse(PlayCommands.scala)
2) generate output(PlayCommands.scala)
3) modify help page (PlayCommands.scala)
4) add playEclipseTask to default setting (PlaySettings.scala)
here is a sample implementation for intellij:
https://github.com/playframework/Play20/commit/994a9aeb8d99e8aac4865955896fd089a345115a
while reusing certain pieces of sbt-eclipse could have been an option, we would rather not have a massive and intrusive library like scalaz as a dependency on play core for a mini feature like this.
Because of the short time-frame I believe it's much easier to create something along the lines of the intellij command (please see above), that's fast, easy to implement and does not require adding any external dependencies.
steps:
1) add a taskKey and task for eclipse(PlayCommands.scala)
2) generate output(PlayCommands.scala)
3) modify help page (PlayCommands.scala)
4) add playEclipseTask to default setting (PlaySettings.scala)
here is a sample implementation for intellij:
https://github.com/playframework/Play20/commit/994a9aeb8d99e8aac4865955896fd089a345115a
while reusing certain pieces of sbt-eclipse could have been an option, we would rather not have a massive and intrusive library like scalaz as a dependency on play core for a mini feature like this.
Because of the short time-frame I believe it's much easier to create something along the lines of the intellij command (please see above), that's fast, easy to implement and does not require adding any external dependencies.
Leave a comment
Just to have this here as well, please see below my proposal which I hope will let us reuse as much form sbt-eclipse as possible without adding too many external dependencies to play (which would not be desirable):
One thing we could do is to extract out generic, scalaz-free pieces of sbt-eclipse into a new project called sbt-eclipse-core which would not dependent on scalaz, only on sbt and would provide a generic interface (not just an sbt plugin one). This library could be then added as a dependency to both play and sbt-eclipse.
If needed I could provide the original implementation of sbt-eclipse-core and then we could merge the two libs.
If it's too problematic I am happy to create an eclipse project file based on the intellij one.
Thanks
One thing we could do is to extract out generic, scalaz-free pieces of sbt-eclipse into a new project called sbt-eclipse-core which would not dependent on scalaz, only on sbt and would provide a generic interface (not just an sbt plugin one). This library could be then added as a dependency to both play and sbt-eclipse.
If needed I could provide the original implementation of sbt-eclipse-core and then we could merge the two libs.
If it's too problematic I am happy to create an eclipse project file based on the intellij one.
Thanks
Good news, folks!
I managed to integrate sbteclipse (1.5.0) with play in such a way that sbt eclipse is only a dependency on the play plugin, not on play core, the library. So hopefully this will make everyone happy:)
however, after running "play eclipse" I have three remaining issues:
- in case of java projects, scala-library.jar is missing from the build (adding it to the classpath manually fixed the problem)
- play is relaying on target/scala_2.9.1/src_managed (adding this to the source list through eclipse fixed the problem)
- play is relaying on generated classes in target/scala_2.9.1/classes (adding this to the classpath through eclipse fixed the problem)
Could you please help with these issues?
Thanks,
Peter
I managed to integrate sbteclipse (1.5.0) with play in such a way that sbt eclipse is only a dependency on the play plugin, not on play core, the library. So hopefully this will make everyone happy:)
however, after running "play eclipse" I have three remaining issues:
- in case of java projects, scala-library.jar is missing from the build (adding it to the classpath manually fixed the problem)
- play is relaying on target/scala_2.9.1/src_managed (adding this to the source list through eclipse fixed the problem)
- play is relaying on generated classes in target/scala_2.9.1/classes (adding this to the classpath through eclipse fixed the problem)
Could you please help with these issues?
Thanks,
Peter
Viktor: WTF?