How to create a WAR file - zipped

2,883 views
Skip to first unread message

Paulo Coutinho

unread,
Nov 3, 2010, 7:02:51 AM11/3/10
to play-fr...@googlegroups.com
Hi,

Im using windows 7 with play 1.1

When i use the command:

play war myapp -o myapp.war

It create a directory with WEB-INF files and not a zip called myapp.war.

What i do?

--
Atenciosamente,
Paulo Coutinho.
Blog: www.prsolucoes.com/blog
Site: www.prsolucoes.com
Msn:  pa...@prsolucoes.com
Skype: paulo.prsolucoes
Consultor Certificado Bindows

Dmitriy S. Aleshkowsky

unread,
Nov 3, 2010, 8:23:32 AM11/3/10
to play-framework
You must use the "--zip" key.

The "play help war" command shows the next synopsis

play war [app_path] --output=war_path [--zip]

Then in your case:
play war myapp -o myapp.war --zip

Dmitriy S. Aleshkowsky

unread,
Nov 3, 2010, 8:29:36 AM11/3/10
to play-framework
Oh, a one little nuance.
If you will use ".war" extension on "-o" option, then you've got
".war.war" extension on zip-file.
You may need to rename, or just doesn't specify extension in the
output path.

On 3 ноя, 15:23, "Dmitriy S. Aleshkowsky" <to.wwarl...@gmail.com>
wrote:

Paulo Coutinho

unread,
Nov 3, 2010, 8:31:31 AM11/3/10
to play-fr...@googlegroups.com
Ok thanks.

It works. :)



2010/11/3 Dmitriy S. Aleshkowsky <to.ww...@gmail.com>
--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To post to this group, send email to play-fr...@googlegroups.com.
To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.

Vortilion

unread,
Aug 24, 2011, 10:54:57 AM8/24/11
to play-fr...@googlegroups.com
It works creating a .war-file, but it doesn't work deploying it... :-( Tried to deploy the yabe-Tutorial project, tomcat complains...

avalez

unread,
Aug 24, 2011, 2:34:01 PM8/24/11
to play-framework
It does work! What's your problem?

gudluri siva

unread,
Jan 18, 2013, 5:11:10 AM1/18/13
to play-fr...@googlegroups.com

Hi paulo,
I am using play 2.1
I am struggling for create war file for my play application. followed play documentation
Please tell where I did mistake

I run command for creating war file,
play war loginapp -o loginapp.war but it showing error.

please see error below in command prompt,

D:\play-2.1\samples\java\loginapp>play war loginapp -o loginapp.war
[info] Loading project definition from D:\play-2.1\samples\java\loginapp\project
[info] Set current project to loginapp (in build file:/D:/play-2.1/samples/java/loginapp/)
[error] Not a valid command: war (similar: start, run)
[error] Expected '/'
[error] Expected ':'
[error] Not a valid key: war (similar: watch, run, target)
[error] war
[error]    ^

Thanks,
Prasad.

Brian Smith

unread,
Jan 18, 2013, 5:16:52 AM1/18/13
to play-fr...@googlegroups.com
You don't appear to have the play2-war-plugin added to your project?

Have you followed the configuration instructions?




--
 
 

Mathew Menalish

unread,
May 21, 2015, 4:19:56 PM5/21/15
to play-fr...@googlegroups.com, pa...@prsolucoes.com
Hi,

I am new to the Play Framework. I am using Play 2.2.6, I want to create a war for my application. I tried with plugin. Its not working. Can anyone help me to resolve this issue. 

Thanks In Advance
Reply all
Reply to author
Forward
0 new messages