Create Maven WAR command prompt window
Maven provides command which can be used to build WAR file from maven war packaging project. Before execute command please check the project for which you are going to make WAR file is maven WAR packaging or not. To check double click open pom.xml file and search for packaging you will see below:
Note: If you want to create maven war project please follow this tutorial
Build WAR File:
- Open command prompt
- Go to project root directory where you have pom.xml
- Execute mvn install command as below:
- If everything setup correctly you will see build success massage on command prompt
- By default maven creates WAR file inside target direcly please refresh and check you will see WAR got created:
For more details maven build please refer Apache official documentation here