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.
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/
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.
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, ...)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With