Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to package the project to war in play2?

In play1, we can package the project to a war, then put it in a tomcat:

play war

But how to do the same in play2? play war doesn't work, it reports war is not a valid task.

like image 208
Freewind Avatar asked Feb 18 '12 01:02

Freewind


3 Answers

as pointed out by @Freewind, officialy, it's not supported, this is because they need the Servlet 3.1 specifications to support all the nice websocket and other advanced features that play2 provides.

However, if you do not use that, there is a plugin on github to provide play war and be able to deploy on some cloud servers, etc: https://github.com/dlecan/play2-war-plugin/

like image 194
Mortimer Avatar answered Nov 07 '22 05:11

Mortimer


It's not still supported, support won't be released until Play 2.1 (as per current plan)

PS: I know your comment says so, but it's better to have it as an answer for people finding this page.

like image 15
Pere Villega Avatar answered Nov 07 '22 05:11

Pere Villega


WAR Plugin for Play framework 2.0 bring this feature.

This project is a module for Play framework 2 to package your apps into standard WAR packages. It can be used with Servlet 3.0 and 2.5 containers (Tomcat 6/7, Jetty 7/8/9, JBoss 5/6/7, ...)

like image 3
Baptiste LH Avatar answered Nov 07 '22 06:11

Baptiste LH