Reputation: 2019
The latest version of play (2.0.1 I think) does not provide a means to pack an application in a web archive. Is there any way to pack an application for distribution?
Upvotes: 4
Views: 575
Reputation: 55798
There is a module for WAR, from its announcement
Play2War is a module for Play framework 2 to package your apps into standard WAR packages: https://github.com/dlecan/play2-war-plugin/
Look at http://servlet30.play-war.cloudbees.net/ for an example (JBoss7 @Cloudbees).
As previous versions, Play2War plugin only supports Servlet 3.x containers, with async request/response model (Tomcat7, JBoss 7, Jetty 8, ...)
v0.3.2 fixes issue with duplicated entries in WAR file (does not fix the same issue for "dist" task).
Remember, this plugin is still in alpha version and project needs testers (Weblogic, Websphere, ...) https://github.com/dlecan/play2-war-plugin/wiki/How-to-help
Damien
Upvotes: 2
Reputation: 40461
There is a plugin for that, called play2-war-plugin. However, pay attention, some features of native play won't be accessible from a a servlet-container. The plugin site displays a compatibility matrix showing current status and planned improvements.
As said by ron in the comment above, you can use play dist
in the play console to produce a standalone jvm application. It's the recommended option for deployment.
Upvotes: 2