[2.0] announcing Play 2.0.2

3,650 views
Skip to first unread message

peter hausel

unread,
Jun 26, 2012, 8:58:51 AM6/26/12
to play-fr...@googlegroups.com
Hi guys,

We are happy to announce the availability of Play 2.0.2! This is by far the biggest release in Play 2's short history (47 tickets closed vs 2.0.1's 19 tickets) and we hope you will enjoy it as much as we do!

Highlights:
-------------
- updated libraries (lessjs and google closure compiler etc.)
- remote address support
- Testing improvements (optional bytecode enhancement on tests, running multiple functional tests at the same time etc.)
- Promise improvements
- IDE improvements
- introduce external assets mapping with full support for hot reloading
- watch and reload plain module and sub-play projects
- more flexibility for Java form validate() operation
- etag enhancements (Etag strings are quoted, Last-Modified and If-Modified-Since are used to determine a possible 304 if etag didn't match)
- fix `play dist` shared artifact issue
- WS bug fixes
- switch sbt to 0.11.3 (this was necessary due to the fact that scala-tools.org repository was terminated, potentially causing artifact downloading issues)

Full changelog:
---------------------

Installation instructions:
----------------------------------
1) download the whole package from here http://www.playframework.org/download 
    (changing play version to 2.0.2 in project/plugins.sbt will work *only* if you use the new play script or the 0.11.3 sbt launcher)

2) change sbt version in project/build.properties to 0.11.3
(related note: the new play script won't work with projects where sbt is set to 0.11.2 in project/build.properties)


Happy playin'!


Play team


Andy Czerwonka

unread,
Jun 26, 2012, 9:12:00 AM6/26/12
to play-fr...@googlegroups.com
Cool! Anything after RC2? Or was it a branding change only?

peter hausel

unread,
Jun 26, 2012, 9:23:40 AM6/26/12
to play-fr...@googlegroups.com
Hi Andy,

The only change since RC2 was back porting this fix:

Thanks,
Peter

James Roper

unread,
Jun 26, 2012, 9:40:51 AM6/26/12
to play-fr...@googlegroups.com
Congrats on the release! :D

Tex

unread,
Jun 26, 2012, 9:56:41 AM6/26/12
to play-fr...@googlegroups.com
 Many thanks !

shahar kobrinsky

unread,
Jun 26, 2012, 11:57:14 AM6/26/12
to play-fr...@googlegroups.com
Thanks! some very good changes.

I'm having an issue with idea. running idea and then loading the ./idea_modules/myModule.iml from idea, all the libraries are unidentified. Am i missing something?
Message has been deleted

Sean B

unread,
Jun 26, 2012, 12:33:38 PM6/26/12
to play-fr...@googlegroups.com
I am experiencing some backward compatibility issues when upgrading from 2.0.1 to 2.0.2.  Is this intentional or accidental?  Should we be expecting non-backward compatibility between patch versions?

Here is what I've found so far:

1) play.GlobalSettings  --> public play.mvc.Result onHandlerNotFound(play.mvc.Http.RequestHeader requestHeader) 

replaced 

play.GlobalSettings --> public play.mvc.Result onHandlerNotFound(String s)

2) play.api.test -->  public FakeRequest(java.lang.String method, java.lang.String uri, play.api.test.FakeHeaders headers, A body, java.lang.String remoteAddress)

replaced 

play.api.test --> public FakeRequest(java.lang.String method, java.lang.String uri, play.api.test.FakeHeaders headers, A body)

Sean B

unread,
Jun 26, 2012, 12:45:10 PM6/26/12
to play-fr...@googlegroups.com
Also, uses of the javascriptRouter no longer compile:

Cannot find any HTTP Request Header here
[error] """),_display_(Seq[Any](/*6.2*/javascriptRouter("jsRoutes")(
[error]                                                            ^


I am using it in an included template in a Java project.

Guillaume Bort

unread,
Jun 26, 2012, 12:57:25 PM6/26/12
to play-fr...@googlegroups.com
These changes were needed by the bug fixes we backported to the 2.0.x
branch. And because we use a no-magic, type safe API, it is safe to do
this kind of small changes. That the benefits of using a statically
compiled language: it is easy to track and fix non compatible change.
> --
> You received this message because you are subscribed to the Google Groups
> "play-framework" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/play-framework/-/grCqYVffdqwJ.
>
> To post to this group, send email to play-fr...@googlegroups.com.
> To unsubscribe from this group, send email to
> play-framewor...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/play-framework?hl=en.



--
Guillaume Bort, http://guillaume.bort.fr

Sean B

unread,
Jun 26, 2012, 1:13:47 PM6/26/12
to play-fr...@googlegroups.com
My question was really just one of managing expectations.  It sounds like we should not expect patch releases to be backward compatible.

Also, please note that while the API may be type safe, it is "easy" to fix errors only if the fix is known.  The first two issues with GlobalSettings and FakeRequest were obvious fixes (since the method names didn't change, just the signatures).  The implicit RequestHeader in javascriptRouter is not an obvious fix (at least not to me).  We were only dabbling with the feature, so I've reverted to not using the javascriptRouter for now.

On Tuesday, June 26, 2012 12:57:25 PM UTC-4, Guillaume Bort wrote:
These changes were needed by the bug fixes we backported to the 2.0.x
branch. And because we use a no-magic, type safe API, it is safe to do
this kind of small changes. That the benefits of using a statically
compiled language: it is easy to track and fix non compatible change.

> To post to this group, send email to play-framework@googlegroups.com.
> To unsubscribe from this group, send email to

Andy Czerwonka

unread,
Jun 26, 2012, 1:26:05 PM6/26/12
to play-fr...@googlegroups.com
I noticed this change.


After upgrading, I still time-out on an expensive WS request. e.g. after 5 seconds with the following code:

`val promise = WS.url(exportEndpoint).post(request)`

So prior to 2.0.2, I added the following:

`promise.await(1L, TimeUnit.MINUTES)`

Do I still need that code or am I reading that commit wrong?

peter hausel

unread,
Jun 26, 2012, 2:40:36 PM6/26/12
to play-fr...@googlegroups.com
Andy, 

Have you set the ws.timeout in your application.conf?

Sean, I just sent you an email.

Thanks,
Peter

peter hausel

unread,
Jun 26, 2012, 2:54:54 PM6/26/12
to play-fr...@googlegroups.com
Shahar,

Have you run compile before running `play idea`?

Thanks,
Peter

Andy Czerwonka

unread,
Jun 26, 2012, 3:23:48 PM6/26/12
to play-fr...@googlegroups.com
Yes.

# Web Service client timeout
ws.timeout=60 seconds

Eric Jain

unread,
Jun 26, 2012, 3:51:05 PM6/26/12
to play-fr...@googlegroups.com
On Tuesday, June 26, 2012 5:58:51 AM UTC-7, peter hausel wrote:
- updated libraries (lessjs and google closure compiler etc.)

What version of the Google Closure Compiler are you using know? Looks like it's still broken on Windows, even though https://play.lighthouseapp.com/projects/82401/tickets/274-closure-compiler-broken-in-windows has been closed?

Other than that, good job!

peter hausel

unread,
Jun 26, 2012, 5:12:36 PM6/26/12
to play-fr...@googlegroups.com
Hi Eric,

It's using r1810

Unfortunately I do not have access to windows. The ticket was closed because users reported that it can be closed - so I assumed it was working.

I will reopen the ticket if someone could provide some extra information on the ticket, namely: 
- what's the error message against 2.0.2?
- is it working on master (master is on r1918)?

Thanks in advance!

Peter

Eric Jain

unread,
Jun 26, 2012, 6:16:09 PM6/26/12
to play-fr...@googlegroups.com
On Tue, Jun 26, 2012 at 2:12 PM, peter hausel <peter....@gmail.com> wrote:
> I will reopen the ticket if someone could provide some extra information on
> the ticket, namely:
> - what's the error message against 2.0.2?
> - is it working on master (master is on r1918)?

I updated the ticket at
https://play.lighthouseapp.com/projects/82401/tickets/274-closure-compiler-broken-in-windows;
looks like we'll have to wait for the next Closure Compiler release...

shahar kobrinsky

unread,
Jun 27, 2012, 1:45:26 AM6/27/12
to play-fr...@googlegroups.com
off course... still having this issue.

shahar kobrinsky

unread,
Jun 27, 2012, 2:22:46 AM6/27/12
to play-fr...@googlegroups.com
Peter,

It seems like the iml of 2.0.2 is creating library as follows:
<orderEntry type="library" name="org.scala-lang_scala-library_2.9.1" level="project" />
while 2.0.1 states the library root:
<orderEntry type="module-library">
      <library>
        <CLASSES>
          <root url="jar:///opt/play-2.0.1/framework/sbt/boot/scala-2.9.1/lib/scala-library.jar!/" />
        </CLASSES>
        <JAVADOC />
        <SOURCES />
      </library>

i guess idea doesn't know where to get the library from..

Marius Soutier

unread,
Jun 27, 2012, 2:43:44 AM6/27/12
to play-fr...@googlegroups.com
Could you point me to the ticket or documentation for this one?

Nico

unread,
Jun 27, 2012, 3:18:33 AM6/27/12
to play-fr...@googlegroups.com
I confirm, Eric, we need to wait for the next Google Closure Compiler release, which should include our awaited patch (http://code.google.com/p/closure-compiler/issues/detail?id=714).

BiGuP

unread,
Jun 27, 2012, 4:41:54 AM6/27/12
to play-fr...@googlegroups.com
Hi,

I've been using play 2.0.1 sucessfully, but today I downloaded play 2.0.2 and I cannot run it. I have the error :

unresolved dependency: org.scala-sbt#sbt_2.9.1;0.11.2: not found
Error during sbt execution: Error retrieving required libraries

I tried few things, like removing all target/* files and also check the build.properties files wich show :
framework/project/build.properties : sbt.version=0.11.3

How can I make it work ?

Thanks,
Laurent.

shahar kobrinsky

unread,
Jun 27, 2012, 4:43:20 AM6/27/12
to play-fr...@googlegroups.com
never mind. i saw that you need to open the project rather than add the module

opensource21

unread,
Jun 27, 2012, 4:51:07 AM6/27/12
to play-fr...@googlegroups.com
You must change the build.properties 

-sbt.version=0.11.2

+sbt.version=0.11.3


And 

plugins.sbt

-addSbtPlugin("play" % "sbt-plugin" % "2.0.1")

+addSbtPlugin("play" % "sbt-plugin" % "2.0.2")


Niels

laurent marchal

unread,
Jun 27, 2012, 4:57:26 AM6/27/12
to play-fr...@googlegroups.com
Great it worked, thank you !

--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To view this discussion on the web visit https://groups.google.com/d/msg/play-framework/-/QKY-EsjIbM8J.

To post to this group, send email to play-fr...@googlegroups.com.
To unsubscribe from this group, send email to play-framewor...@googlegroups.com.

ibsdevs

unread,
Jun 27, 2012, 5:19:53 AM6/27/12
to play-fr...@googlegroups.com
What is to do to get javascript routes working:

Cannot find any HTTP Request Header here
[error]     Ok(Routes.javascriptRouter("jsRoutes")( ...


Thanks

ibsdevs

unread,
Jun 27, 2012, 5:37:03 AM6/27/12
to play-fr...@googlegroups.com

Guillaume Bort

unread,
Jun 27, 2012, 9:13:00 AM6/27/12
to play-fr...@googlegroups.com
Yes we changed that so the generated javascript router has access to
the HOST header of the request, and is able to do call using an
absolute URL.
> --
> You received this message because you are subscribed to the Google Groups
> "play-framework" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/play-framework/-/XLzkcRykTrUJ.
>
> To post to this group, send email to play-fr...@googlegroups.com.
> To unsubscribe from this group, send email to
> play-framewor...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/play-framework?hl=en.



eduardo.m.cavalcanti

unread,
Jun 27, 2012, 9:29:09 AM6/27/12
to play-fr...@googlegroups.com
Try this, if already have not:
.../project/plugins.sbt
Modify the line:

addSbtPlugin("play" % "sbt-plugin" % "2.0.1")
to
addSbtPlugin("play" % "sbt-plugin" % "2.0.2")


--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To view this discussion on the web visit https://groups.google.com/d/msg/play-framework/-/YlhmSYXRUAAJ.

James Ong

unread,
Jun 27, 2012, 9:54:24 AM6/27/12
to play-fr...@googlegroups.com
I need help with invalid respo path which after creating a Scala project, attempted to run "play run" would throw these errors:

          http://scala-tools.org/repo-snapshots/org/scala-tools/sbt/sbt_2.9.1/0.
11.3/sbt_2.9.1-0.11.3.pom

                ::::::::::::::::::::::::::::::::::::::::::::::

                ::          UNRESOLVED DEPENDENCIES         ::

                ::::::::::::::::::::::::::::::::::::::::::::::

                :: org.scala-tools.sbt#sbt_2.9.1;0.11.3: not found

                ::::::::::::::::::::::::::::::::::::::::::::::



:: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS
unresolved dependency: org.scala-tools.sbt#sbt_2.9.1;0.11.3: not found

Error during sbt execution: Error retrieving required libraries
  (see C:\Users\yanli\Desktop\play-2.0.1\framework\.\sbt\boot\update.log for com
plete log)
Error: Could not retrieve sbt 0.11.3

Marcos Pereira

unread,
Jun 27, 2012, 1:49:08 PM6/27/12
to play-fr...@googlegroups.com
Are you using the correct version of play script? Looks like you still using Play 2.0.1:

From the posted error message: 

Error during sbt execution: Error retrieving required libraries
  (see C:\Users\yanli\Desktop\play-2.0.1\framework\.\sbt\boot\update.log for complete log)

--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To view this discussion on the web visit https://groups.google.com/d/msg/play-framework/-/2r0MABhibzgJ.

James Ong

unread,
Jun 27, 2012, 2:54:06 PM6/27/12
to play-fr...@googlegroups.com
I see, found the path was pointed to the old location (2.0.1). Update and it works fine!

Thanks.

Tex

unread,
Jun 28, 2012, 10:48:00 AM6/28/12
to play-fr...@googlegroups.com
Many thanks to all !!!

One little gotcha: if I want to use commons-io.FileUtils I must create a lib folder and put the commons-io jar here, if I don't do this, play can't see the jar, very strange...

Marcos Pereira

unread,
Jun 28, 2012, 5:03:03 PM6/28/12
to play-fr...@googlegroups.com
Which version of commons-io? 
--
http://about.me/marcospereira


On Thu, Jun 28, 2012 at 11:48 AM, Tex <giate...@gmail.com> wrote:
Many thanks to all !!!

One little gotcha: if I want to use commons-io.FileUtils I must create a lib folder and put the commons-io jar here, if I don't do this, play can't see the jar, very strange...

--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To view this discussion on the web visit https://groups.google.com/d/msg/play-framework/-/l_DMxje8atwJ.

Guillaume Bort

unread,
Jul 9, 2012, 5:04:47 AM7/9/12
to play-fr...@googlegroups.com
I'm not sure. Please check the master to verify that it has been
fixed. Otherwise feel free to fix it and submit a pull-request.

On Sun, Jul 8, 2012 at 9:36 PM, Nikhil Tibrewal <1803....@gmail.com> wrote:
> I was wondering if the following issue is fixed in this version (for scala):
>
> When using the html select tag, I'm trying to set the selected attributed of
> the options tag, but it's not working. I checked the source code for the
> select tag, and found this line:
>
> <option value="@v._1" @(if(value == Some(v._1)) "selected" else
> "")>@v._2</option>
>
> I have a like in my select tag that says '_value -> Some(v._1), where v._1
> is the first value of the tuple that i want to
> select from the options list, but it's not working.
>
> I feel like there is an error here. You have to assign the selected tag like
> 'selected = "selected"', and not just write
> "selected" there. Has this issue been fixed in the new version?
>
> Thanks,
> Nikhil
> --
> You received this message because you are subscribed to the Google Groups
> "play-framework" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/play-framework/-/2XsskOEErH8J.
>
> To post to this group, send email to play-fr...@googlegroups.com.
> To unsubscribe from this group, send email to
> play-framewor...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/play-framework?hl=en.



Reply all
Reply to author
Forward
0 new messages