Sunday 16 November 2014

Building WAR file using MAVEN

Hi, Today I'm going talk about how to build a WAR file using maven. To build a war using maven, follow below steps,
Step 1:
Download maven, and set it in Path like C:\apache-maven-3.1.1\bin; (installed location)

Step 2:
Create a system variable JAVA_HOME and set it with the location where jdk installed, if java installed on Program Files then C:\Progra~1\Java\jdk1.7.0_71;, or on Program Files(x86) then C:\Progra~2\Java\jdk1.7.0_71; (because it won't take spaces in the directory name).

Step 3:
Open command prompt, and go to your web application location,(where you find pom.xml), then run below command,
mvn package

After that go to your web application folder open target folder inside it there you can find the created war file.

Thanks.. 

No comments:

Post a Comment