I created a MAVEN project (File –> New –> Maven Project). Inside this project, there are web related files and java files. I intended to create a WAR file for the project so that I can deploy the WAR file to the TomCat server.
What are the steps to create the WAR on this Maven project?
If you have created the project using File –> New –> Maven Project, then it is not recognized as maven web project in MyEclipse. You should add the appropriate facets like Dynamic Web Module and Java. Right click on the project > Properties > Project Facets page and add the appropriate facets. Now you can export this project as WAR.
Alternatively, you can select a web archetype while creating the project using File > New > Maven Project, do not enable the ‘Create a simple project’ and select a web archetype in the next window.
You can also create a maven web project using File > New > Web Project, enable the ‘Add Maven support’ option and export as war or deploy to the server directly.