Play 2.3.2 released!

2,084 views
Skip to first unread message

James Roper

unread,
Jul 20, 2014, 10:20:46 PM7/20/14
to play-framework
The Play team are proud to announce the release of Play 2.3.2!

The release fixes a few regressions introduced in Play 2.3.0 and 2.3.1, but primarily is focussed on revamping Play's dev mode to be more flexible and have greater cross platform support.  The highlights of this work are that Play now doesn't reload the entire app when assets change (including when assets that require compilation change such as less and CoffeeScript), and on Windows and Linux with JDK7 and above, Play will use the Java WatchService API to watch the filesystem for changes instead of JNotify.

Here are the changes in this release:
  • 2905 Ensure assets changes don’t trigger reload of Play
  • 2946 Ignore benign JNotify watch removal errors
  • 3073 Ensure stability of ordering of reverse routes matching
  • 3074 Remove double slashes from assets fingerprinting
  • 3122 Remove dependence of Assets on Play.current
  • 3129 Allow generating https URLs without a request object
  • 3141 Don’t duplicate Content-Type header when explicitly set in WS
  • 3173 Add support for JDK7 WatchService in dev mode
For a full list of changes, visit GitHub:


Upgrade notes:

On Windows and Linux on JDK7 and above, Play now uses the JDK7 WatchService. This has some small differences from the old mechanism - JNotify. If the JNotify behaviour is preferred, this can be configured in build.sbt using:

PlayKeys.playWatchService := play.sbtplugin.run.PlayWatchService.jnotify(Keys.sLog.value)

Alternatively, you can also use a pure SBT implementation, using:

PlayKeys.playWatchService := play.sbtplugin.run.PlayWatchService.sbt(pollInterval.value)

Note that while the JDK7 WatchService works on other platforms, including OSX, its use is not recommended for Play’s dev mode because on those platforms it simply polls the filesystem at a 2 second interval.


The Play team would like to particularly thank the people that tested out the 2.3.2 release candidates to ensure the quality of the new dev mode changes.

--
James Roper
Software Engineer

Typesafe – Build reactive apps!
Twitter: @jroper

Marius Soutier

unread,
Jul 21, 2014, 2:09:55 AM7/21/14
to play-fr...@googlegroups.com
Doesn’t seem to resolve yet...


--
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.
For more options, visit https://groups.google.com/d/optout.

Ryan Means

unread,
Jul 21, 2014, 11:03:13 AM7/21/14
to play-fr...@googlegroups.com
Did something change with the test suite process in 2.3.2?

I used to get a line written in the console for every single test case that either passed or failed, as well as a summary report per each test suite. Now I'm only getting a summary message at the end of the a successful test run for all of the suites, i.e.:
[info] Passed: Total 109, Failed 0, Errors 0, Passed 109
If something does happen to fail, I do see a line written to the console for that one failure, and then the summary at the end.

Is this expected behavior in 2.3.2? I threw me off a little bit as I didn't think my tests were running until I inspected them a little closer.

As an FYI, I'm using Play Java with standard JUnit tests with a fake application server.




Andrew Gaydenko

unread,
Jul 21, 2014, 2:59:32 PM7/21/14
to play-fr...@googlegroups.com
On Monday, July 21, 2014 6:20:46 AM UTC+4, James Roper wrote:
The Play team are proud to announce the release of Play 2.3.2!

Thanks to the team!

Terry L

unread,
Jul 21, 2014, 5:42:18 PM7/21/14
to play-fr...@googlegroups.com
Hi James,

After the upgrade, I got a green build so no problem there.

As a test (in case I needed to fall back to JNotify), I added the following line to build.sbt:

PlayKeys.playWatchService := play.sbtplugin.run.PlayWatchService.jnotify(Keys.sLog.value)

When I tried to reload the build file, sbt complained about "Keys.sLog" (the argument to jnotify()) with the error message of "found : sbt.Logger" "required: sbt.File". If I changed it from "Keys.sLog.value" to "Keys.sourceDirectory.value", then sbt was happy to load it.

Would you confirm the correct source path to pass in to jnotify() method? Thanks.

Regards,
Terry

Megazord

unread,
Jul 21, 2014, 7:41:56 PM7/21/14
to play-fr...@googlegroups.com
Ryan,

I can confirm that the test output changed. I suspect the problem is related with multiple slf4j binds, but I can't prove it yet.

Best,

James Roper

unread,
Jul 21, 2014, 8:07:48 PM7/21/14
to play-framework
This was overlooked.  We switched from using Play's junit xml test logger to the new builtin xml test logger in SBT.  However Play's junit xml logger also logged more detailed messages to the console, whereas the built in SBT one doesn't, so that meant we're left with what sbt's junit support provides by default, which is not much.

To enable test logging, you can do this in build.sbt:

testOptions += Tests.Argument(TestFrameworks.JUnit, "-q", "-v")

The -q option is not necessary, but is nice, it suppresses standard out from your tests unless a test failed.


--
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.
For more options, visit https://groups.google.com/d/optout.

James Roper

unread,
Jul 21, 2014, 8:08:54 PM7/21/14
to play-framework
Sorry, it should be Keys.target.value.


--
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.
For more options, visit https://groups.google.com/d/optout.

Jacek Laskowski

unread,
Jul 24, 2014, 9:19:27 AM7/24/14
to play-fr...@googlegroups.com
On Tuesday, July 22, 2014 2:08:54 AM UTC+2, James Roper wrote:
Sorry, it should be Keys.target.value.

Since sbt.Keys is imported by default in sbt builds, it's enough to use target.value, isn't it?

Jacek

Slim Slam

unread,
Jul 25, 2014, 4:54:22 PM7/25/14
to play-fr...@googlegroups.com
In order to upgrade a Java Play app running under version 2.3.1, is all one has to
do is change "2.3.1" to "2.3.2" in the appname/project/plugins.sbt file?

J

Donovan Muller

unread,
Jul 28, 2014, 7:19:46 AM7/28/14
to play-fr...@googlegroups.com
In most cases, yes.

Megazord

unread,
Jul 28, 2014, 2:40:01 PM7/28/14
to play-fr...@googlegroups.com
We had to basically change three things:

1. Change the project/plugins.sbt to update play version to 2.3.2
2. Change the assets route considering this issue was fixed: https://github.com/playframework/playframework/issues/3137
3. Add the following line to your build.sbt if you are using junit:

testOptions += Tests.Argument(TestFrameworks.JUnit, "-v", "-q")

HTH
Reply all
Reply to author
Forward
0 new messages