Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I automate (script) creating a war file in eclipse?

Tags:

eclipse

war

It's 5 button clicks to get eclipse to create a deployable war file for my eclipse project, I figure there's probably some eclipse command line option to do the same thing, so I can just write it into a script, but I'm not seeing it.

like image 348
stu Avatar asked Nov 16 '08 14:11

stu


People also ask

What is the command to create a war file?

You need to use -c switch of jar, to create the war file. Go inside the project directory of your project (outside the WEB-INF), then write the following command: jar -cvf projectname. war *

Where is the war file generated in eclipse?

right click in project > export > web project > . war Then copy the . war file into webapp directory of your apache tomcat.


1 Answers

Use the Ant war task, set up a relevant build file and you can just hit the "external tools" button to execute it.

like image 77
Jon Skeet Avatar answered Sep 22 '22 03:09

Jon Skeet