Switch to "sbt new"?

252 views
Skip to first unread message

Naftoli Gugenheim

unread,
Oct 10, 2016, 2:17:23 AM10/10/16
to play-fram...@googlegroups.com
Hi, being that sbt 0.13.13 is getting an "sbt new" command (and I think I've heard the lightbend is deemphasizing activator), will the documentation be updated to use sbt new instead of downloading activator?

Also, it seems https://groups.google.com/d/topic/sbt-dev/GmQ2_2MzWJI/discussion that while the template resolver mechanism is pluggable, they currently only have giter8 support (althought that seems stalled https://github.com/sbt/sbt/milestone/20 with some classpath conflict). I think it would be a good idea for someone to contribute an Activator template resolver, to make things easier for Play users and template authors.

Although the "right" way to interface with activator seems convoluted, downloading a lucene database just to locate templates, you can really just scrape them like this: https://gist.github.com/nafg/05fafb7050ed38854184b4ca64612da7.

Greg Methvin

unread,
Oct 10, 2016, 7:24:27 PM10/10/16
to Naftoli Gugenheim, play-fram...@googlegroups.com
In addition to the "sbt new" command, we are also planning on having a set of example projects available for download. These projects will have an embedded ./sbt launcher so you don't need to install SBT separately. I think it's a nice strategy for new users who might be unfamiliar with SBT.

We still support Activator, but we'll probably de-emphasize it in the documentation since the only place you really need it is for creating a new project. So essentially we'd recommend using Activator if you want the graphical interface and tutorials that come with it, and otherwise suggest you use SBT directly.



--
You received this message because you are subscribed to the Google Groups "Play framework dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to play-framework-dev+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Greg Methvin
Senior Software Engineer

Naftoli Gugenheim

unread,
Oct 10, 2016, 7:58:19 PM10/10/16
to Greg Methvin, play-fram...@googlegroups.com
On Mon, Oct 10, 2016 at 7:24 PM Greg Methvin <gr...@lightbend.com> wrote:
In addition to the "sbt new" command, we are also planning on having a set of example projects available for download. These projects will have an embedded ./sbt launcher so you don't need to install SBT separately. I think it's a nice strategy for new users who might be unfamiliar with SBT.

Sure. I remember that's what Lift did. I just think it shouldn't be too "front and center" -- it's kind of a low-tech method.


We still support Activator, but we'll probably de-emphasize it in the documentation since the only place you really need it is for creating a new project. So essentially we'd recommend using Activator if you want the graphical interface and tutorials that come with it, and otherwise suggest you use SBT directly.

Then it would be really good if someone in lightbend could get an activator templateResolver into sbt 0.13.13. Otherwise every template author will have to maintain two versions, one for giter8 and one for activator.

BTW, another advantage you had with Activator that you can now get with sbt is the offline download. https://github.com/sbt/sbt-export-repo makes it possible to do that with plain sbt.   
 



On Sun, Oct 9, 2016 at 11:17 PM, Naftoli Gugenheim <nafto...@gmail.com> wrote:
Hi, being that sbt 0.13.13 is getting an "sbt new" command (and I think I've heard the lightbend is deemphasizing activator), will the documentation be updated to use sbt new instead of downloading activator?

Also, it seems https://groups.google.com/d/topic/sbt-dev/GmQ2_2MzWJI/discussion that while the template resolver mechanism is pluggable, they currently only have giter8 support (althought that seems stalled https://github.com/sbt/sbt/milestone/20 with some classpath conflict). I think it would be a good idea for someone to contribute an Activator template resolver, to make things easier for Play users and template authors.

Although the "right" way to interface with activator seems convoluted, downloading a lucene database just to locate templates, you can really just scrape them like this: https://gist.github.com/nafg/05fafb7050ed38854184b4ca64612da7.




--

You received this message because you are subscribed to the Google Groups "Play framework dev" group.

To unsubscribe from this group and stop receiving emails from it, send an email to play-framework-...@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.




--
Greg Methvin
Senior Software Engineer


--

You received this message because you are subscribed to the Google Groups "Play framework dev" group.

To unsubscribe from this group and stop receiving emails from it, send an email to play-framework-...@googlegroups.com.

Greg Methvin

unread,
Oct 11, 2016, 4:47:02 PM10/11/16
to Naftoli Gugenheim, play-fram...@googlegroups.com
On Mon, Oct 10, 2016 at 4:58 PM, Naftoli Gugenheim <nafto...@gmail.com> wrote:


On Mon, Oct 10, 2016 at 7:24 PM Greg Methvin <gr...@lightbend.com> wrote:
In addition to the "sbt new" command, we are also planning on having a set of example projects available for download. These projects will have an embedded ./sbt launcher so you don't need to install SBT separately. I think it's a nice strategy for new users who might be unfamiliar with SBT.

Sure. I remember that's what Lift did. I just think it shouldn't be too "front and center" -- it's kind of a low-tech method.

The main problem is friction for new users, especially ones coming from the Java world where SBT is practically unknown. But I would like to ultimately make it possible to get the same templates either by direct download or through the "sbt new" command.



We still support Activator, but we'll probably de-emphasize it in the documentation since the only place you really need it is for creating a new project. So essentially we'd recommend using Activator if you want the graphical interface and tutorials that come with it, and otherwise suggest you use SBT directly.

Then it would be really good if someone in lightbend could get an activator templateResolver into sbt 0.13.13. Otherwise every template author will have to maintain two versions, one for giter8 and one for activator.

I'd like to see this as well. "sbt new" isn't a proper replacement for "activator new" until that happens. Though I'm more concerned with our official templates than the large number of mostly-outdated third-party templates.
 

BTW, another advantage you had with Activator that you can now get with sbt is the offline download. https://github.com/sbt/sbt-export-repo makes it possible to do that with plain sbt.

Yeah, eventually we could include that in our sample templates so you don't even need to download the project's dependencies separately.
 
 
 



On Sun, Oct 9, 2016 at 11:17 PM, Naftoli Gugenheim <nafto...@gmail.com> wrote:
Hi, being that sbt 0.13.13 is getting an "sbt new" command (and I think I've heard the lightbend is deemphasizing activator), will the documentation be updated to use sbt new instead of downloading activator?

Also, it seems https://groups.google.com/d/topic/sbt-dev/GmQ2_2MzWJI/discussion that while the template resolver mechanism is pluggable, they currently only have giter8 support (althought that seems stalled https://github.com/sbt/sbt/milestone/20 with some classpath conflict). I think it would be a good idea for someone to contribute an Activator template resolver, to make things easier for Play users and template authors.

Although the "right" way to interface with activator seems convoluted, downloading a lucene database just to locate templates, you can really just scrape them like this: https://gist.github.com/nafg/05fafb7050ed38854184b4ca64612da7.




--

You received this message because you are subscribed to the Google Groups "Play framework dev" group.

To unsubscribe from this group and stop receiving emails from it, send an email to play-framework-dev+unsub...@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.




--
Greg Methvin
Senior Software Engineer






--

You received this message because you are subscribed to the Google Groups "Play framework dev" group.

To unsubscribe from this group and stop receiving emails from it, send an email to play-framework-dev+unsub...@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

Will Sargent

unread,
Oct 28, 2016, 12:50:47 AM10/28/16
to Play framework dev
Following up on this:

There are two giter8 templates for Play 2.5.x, which are explicitly seeds (no samples, no fancy set up):


To run, use giter8 for now until "sbt new" is there:

brew update && brew install g8
g8 playframework/play-java-seed --name=myapp-java

The only addition is that they are set up with CSRF, allowed hosts and security filters out of the box -- you can remove them, but now it's an explicit choice.

There is a scaffold built in for building forms: "g8Scaffold form" will prompt you for a name, and then build a $Name$Controller, form.scala.html, and $Name$Data case class.  I haven't figured out a way to add new routes from a scaffold to the conf/routes file, but it's in the comments.

Please review and try it out!  

Will.

Will Sargent

unread,
Oct 28, 2016, 12:51:31 AM10/28/16
to Play framework dev, nafto...@gmail.com
The example projects are also all up:


Will
Reply all
Reply to author
Forward
0 new messages