[2.4.0] how to create a play-scala 2.3.8 using activator 1.3.2

720 views
Skip to first unread message

Leandro Komosinski

unread,
Jun 9, 2015, 5:28:49 PM6/9/15
to play-fr...@googlegroups.com
  Hi,

Is it possible to create an 2.3.8 play-scala application using activator 1.3.2?  If I type

activator new ap1 play-scala <Enter>


the  app created is 2.4.0.

I use Play (Scala) for teaching web programming and all class transparencies are based on 2.3.8 demos (code & configuration) .  For the next term (august) I'll update my transparencies. But until there students' tasks are all 2.3.8 style. It will be terrible if they have to create a 2.4.0 version and then "manually refactor" for 2.3.8.

Thanks

Leandro

Ruither Borba

unread,
Jun 9, 2015, 9:04:02 PM6/9/15
to play-fr...@googlegroups.com
Download an older version of the activator is not an option?

Leandro Komosinski

unread,
Jun 10, 2015, 4:12:20 PM6/10/15
to play-fr...@googlegroups.com
  Hi, 

For all  Play 2.3.x versions, the link is http://downloads.typesafe.com/typesafe-activator/1.3.4/typesafe-activator-1.3.4-minimal.zip   . This link is the same for 2.4.0 version.

  How is that possible? It's very confusing download the very same file for different Play versions.

  Leandro

Danillo Magno

unread,
Jun 10, 2015, 8:23:55 PM6/10/15
to play-fr...@googlegroups.com
The version of the Play is determined by the version of the plugin added in the plugins.sbt file.
 Just change the line addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.4.0") in the plugins.sbt to the version you want.
In you case change to addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.3.8")

I think that is it. :)

Nigel Rowe

unread,
Jun 11, 2015, 5:21:19 AM6/11/15
to play-fr...@googlegroups.com
I recommend the play download page be updated to make it clear that an older version of the activator will give you the latest version of play. i.e. activator 1.3.2 gives play 2.4.0. Currently it suggests you can get 2.3.X versions which isn't accurate when using play-java or play-scala.

Ideally play templates for the older version would exist allowing for "activator new app play-scala-2.3.8".

Below are the changes I recall requiring to recreate something close to what 2.3.8 would have created (i.e. some plugins will be newer then were available at the time).

Switching back from play 2.4.0 to 2.3.8 required:
* Changing project/plugins.sbt to play plugin 2.3.8
* Removing from build.sbt "routesGenerator := InjectedRoutesGenerator"
* Making the index method within the Application controller static

Nathan Williams

unread,
Jun 11, 2015, 2:03:00 PM6/11/15
to play-fr...@googlegroups.com
In addition, some of the application.conf parameters have changed.  The most obvious one is application.secret -> play.crypto.secret, but there are a number of others.



Nate

Leandro Komosinski

unread,
Jun 12, 2015, 12:20:55 PM6/12/15
to play-fr...@googlegroups.com
2.4.0 Migration page (https://www.playframework.com/documentation/2.4.x/Migration24) shows how many modifications are needed when upgrading.

I agree with Nigel: the ideal (correct?) solution should be a template for each play version.

Naftoli Gugenheim

unread,
Jun 14, 2015, 5:49:04 PM6/14/15
to play-fr...@googlegroups.com

IIUC activator templates are just github repos. I don't think the version of the template has nothing to with the version of activator, because they don't ship with activator, it looks them up on github. I don't know whether activator lets you specify a version or tag/branch ref of the template to use.

FWIW the latest intellij Scala plugin seems to allow you to create a new project from an activator template, so you don't actually need to download activator (and clearly the software is decoupled from the available templates). Unfortunately when I tried it last it was a bit buggy (the displayed description didn't correspond to the selected template), but in sure that wouldn't last long.


--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to play-framewor...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/play-framework/458653f9-f7d7-4426-a4ba-be9f81a541c4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

James Roper

unread,
Jun 15, 2015, 1:10:46 AM6/15/15
to play-framework
Hi all,

To create a Play 2.3 project in Activator, use the play-scala-2.3 or play-java-2.3 templates.

Cheers,

James


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



--
James Roper
Software Engineer

Typesafe – Build reactive apps!
Twitter: @jroper

Leandro Komosinski

unread,
Jun 15, 2015, 7:49:49 AM6/15/15
to play-fr...@googlegroups.com
Hi James,

Is template's name correct? Activator can't find it.

Leandro

Nathan Williams

unread,
Jun 15, 2015, 11:06:23 AM6/15/15
to play-fr...@googlegroups.com

No joy

activator new play-java-2.3 
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
objc[48942]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/bin/java and /Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre/lib/libinstrument.dylib. One of the two will be used. Which one is undefined.
----------
Java 8 JRE detected but not enabled. Not starting the New Relic Agent.
----------

Fetching the latest list of templates...

Browse the list of templates: http://typesafe.com/activator/templates
Choose from these featured templates or enter a template name:
  1) minimal-akka-java-seed
  2) minimal-akka-scala-seed
  3) minimal-java
  4) minimal-scala
  5) play-java
  6) play-scala
(hit tab to see a list of all templates)

% activator list-templates | & fgrep play | fgrep java
  play-java
  just-play-java
  play-java-2.3-preview
  play-java-preview
  play-java-react-seed
  play-java-reactive-platform-15v01
  hello-play-java
  play-bigpipe-with-rxjava-hystrix
  play-java-dagger-dependency-injection
  play-java-intro
  play-java-intro-preview
  play-java-intro-reactive-platform-15v01
  play-java-spring
  reactive-java8-play

No template for play 2.3 other than the 2.3-preview template.


Nate
Reply all
Reply to author
Forward
0 new messages