[2.1][ANN] Play2War module 0.9-RC1 released (compatible with Play 2.1-RC1)

239 views
Skip to first unread message

Damien Lecan

unread,
Dec 7, 2012, 7:37:38 AM12/7/12
to play-fr...@googlegroups.com
Hello,

Play2War is a module for Play2 to package your apps into standard WAR packages:
https://github.com/dlecan/play2-war-plugin/

Play2War v0.9-RC1 is now compatible with Play 2.1-RC1, that is to say you can now deploy applications in sub context!! (ie http://myhost/playapp).

See full changelog for other modifications:
https://github.com/dlecan/play2-war-plugin/wiki/Changelog

Play2War can be considered stable as of v0.8.

Next steps: websocket (Tomcat, Jetty, Servlet 3.1) and Servlet 3.1 async I/O support.

Enjoy !

Damien

Yann Simon

unread,
Dec 8, 2012, 12:37:18 PM12/8/12
to play-fr...@googlegroups.com
great job!

2012/12/7 Damien Lecan <m...@dlecan.com>


Damien

--
 
 

Marc CARRÉ

unread,
Jan 13, 2013, 2:16:58 PM1/13/13
to play-fr...@googlegroups.com
Very good job indeed!
Many thanks for maintaining this plugin.

One question regarding deploying to Tomcat6 under a subcontext, though:
Do you have a sample application configured for servlet 2.5 and leveraging subcontexts at hands?

I tried the below but no luck so far: 
  • I downloaded Play 2.1-RC1, created a new app (play new test);
  • I configured it according to the wiki (with a few tweaks given the documentation seems to be for Play 2.0.x and the API changed in 2.1.x);
  • I added this web.xml under test/war/WEB-INF, so play2war can pick it up and package it;
  • I tried to deploy the war both as test.war and test-1.0-SNAPSHOT.war;

but in both cases, I end up with "Action not found".
I am probably missing something simple, but I couldn't find what exactly. Any idea what it could be?

Full project available on GitHub: https://github.com/marccarre/play-2.1-RC1-with-play2war-0.9-RC1

Cheers,

M.

Damien Lecan

unread,
Jan 14, 2013, 10:55:16 AM1/14/13
to play-fr...@googlegroups.com
> Do you have a sample application configured for servlet 2.5 and leveraging
> subcontexts at hands?

P2W sample is a servlet 3.0 *and* 2.5 play2 application.
https://github.com/dlecan/play2-war-plugin/tree/develop/sample

This is a multi-modules application :
- common => common assets
- servlet25 => servlet 2.5 specific code
- servlet30 => servlet 3.0 specific code (none actually)

> I configured it according to the wiki (with a few tweaks given the
> documentation seems to be for Play 2.0.x and the API changed in 2.1.x);

Doc will be rewrite for next release of P2W (0.9-RC2).
Work is almost done, except on "subcontext" :)

> I added this web.xml under test/war/WEB-INF, so play2war can pick it up and
> package it;

This is not necessary, P2W plugin will generate a default web.xml for you.
If you don't need to tweak it, let P2W generate it.

> but in both cases, I end up with "Action not found".

Subcontext is a Play feature, not a Play2War one.
You have to configure "application.context" key in your application.conf:
https://github.com/dlecan/play2-war-plugin/blob/develop/sample/common/conf/application.conf#L48

Damien

Marc CARRÉ

unread,
Jan 14, 2013, 4:42:13 PM1/14/13
to play-fr...@googlegroups.com
Thank you very much Damien! It is now working like a charm!
I was missing the very last part: adding the sub-context in application.conf (e.g. application.context=/test/)

I have also followed your suggestion and removed web.xml since I didn't need any specific configuration.

In case it can help someone else out there, I have updated my sample project and the step-by-step guide:
https://github.com/marccarre/play-2.1-RC1-with-play2war-0.9-RC1

I will have a closer look at your sample project as well.
Thanks again for everything, and I definitely look forward to 0.9-RC2 and later, the final version for Play 2.1 :-)

Cheers,

M.
Reply all
Reply to author
Forward
0 new messages