How to make war file in Eclipse
173,931
File -> Export -> Web -> WAR file
OR in Kepler follow as shown below :
Related videos on Youtube
Author by
vbence
Hi, my name is Bence and I'm a developer. Current projects: stream.m - A WebM and H.264 live streaming server DVB InputStream - Java interface for digital tuners (for Windows and Linux)
Updated on June 09, 2020Comments
-
vbence almost 4 years
What is the easy way to make war file?
My project is working when i right click run on server, but i want to deploy on tomcat server. I have installed
m2clipse
but it gave me an error.- Is maven compulsory to make war file?
Do i need special directory structure to make war with eclipse?
Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.1.1:war (default-war) on project testing2: Error assembling WAR: webxml attribute is required (or pre-existing WEB-INF/web.xml if executing in update mode) -> [Help 1] [ERROR]
-
Chris Thompson about 13 yearsI believe you can also export a jar file and simply give it a .war extension
-
Konstantin Komissarchik about 13 yearsExporting a jar and renaming it will most definitely not work. While both jar and war are basically zip archives, their contents are drastically different.
-
Chris Thompson about 13 yearsThe only difference is the presence of the WEB-INF directory and the location of the binary output. Eclipse can be configured to generate this properly via the jar export functionality.
-
Konstantin Komissarchik about 13 yearsThat's not the only difference. A WAR has "web content" in addition to descriptors and java classes. The export WAR wizard works with the Eclipse Dynamic Web Project than the asker is undoubtedly using to make sure that the web content and all the other pieces get properly packaged into the WAR.
-
Dan Jameson about 10 yearsMy version of Eclipse (Kepler, 20130614-0229) has neither "Web" nor "WAR file" as an export option.
-
KNU almost 10 years@DanJameson in the
Project Explorer
menuRight Click
on the Web project to findExport
->WAR File
. Thanx -
KrishPrabakar almost 9 years@Dan Jameson - Is your project a '(Dynamic) Web Project' ?
-
Cos64 about 7 years@DanJameson My Eclipse (Neon) also didn't have the option to export to "Web / WAR file", until I installed "Eclipse Java EE Developer Tools".