user2786785 user2786785 - 2 days ago 5
Java Question

Play 2.2.0 - How to create a war file

I am using play 2.2.0 for my application so inorder to host the application i need to create a war file so i can host in my Tomcat7 server. So is there any method to


  1. Clean and Build as we have options in netbeans with console.

  2. Create war file so i can host.

  3. The method to create a war file as in normal jsp hosting i paste all my class files in WEB_INF folder but here how can i do please tell the procedure. I just gave few try this i have mentioned below i know i am wrong please show me the right way.

    F:\Play_workspace\ThemePractice>play war
    [info] Loading project definition from F:\Play_workspace\ThemePractice\project
    [info] Set current project to ThemePractice (in build file:/F:/Play_workspace/Th
    emePractice/)
    [error] Not a valid command: war (similar: start)
    [error] Not a valid project ID: war
    [error] Expected ':' (if selecting a configuration)
    [error] Not a valid key: war (similar: watch, run, apiUrl)
    [error] war
    [error] ^


Answer

There is a plugin for creating a war file, however Play 2.2.x is currently not supported.

Although a branch exists on Github for this feature, it looks like it is still being worked on. You'd have to contact the maintainers for a time line.

Update: It is now possible to create a war file with Play 2.2.x, see Paul D. Eden's comment.

Comments