Just add pom.xml inside project folder.

 

Add the following:

<modelVersion>4.0.0</modelVersion>
<groupId>CrunchifyTutorial</groupId>
<artifactId>CrunchifyTutorial</artifactId>
<version>0.0.1SNAPSHOT</version>
<packaging>war</packaging>
<build>
<sourceDirectory>src</sourceDirectory>
<plugins>
<plugin>
<artifactId>mavencompilerplugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<plugin>
<artifactId>mavenwarplugin</artifactId>
<version>2.4</version>
<configuration>
<warSourceDirectory>WebContent</warSourceDirectory>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servletapi</artifactId>
<version>2.5</version>
</dependency>
</dependencies>
</project>
Configuration is done.
just run on the pom.xml
use maven standard goals that will create.
mvn clean compile install.
Advertisements