Create Maven WAR command prompt window

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:

Create Maven WAR command prompt window

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:

Create Maven WAR command prompt window

  • If everything setup correctly you will see build success massage on command prompt

Create Maven WAR command prompt window

  • By default maven creates WAR file inside target direcly please refresh and check you will see WAR got created:

Create Maven WAR command prompt window

For more details maven build please refer Apache official documentation here

Leave a Reply

Your email address will not be published. Required fields are marked *

I am not Robot *