How do I create a web application project using maven?
Author: Deron Eriksson
Description: This tutorial describes how to create a web application project using maven.
Tutorial created using: Windows Vista || JDK 1.6.0_04 || Eclipse Web Tools Platform 2.0.1 (Eclipse 3.3.1)

Page: < 1 2

(Continued from page 1)

After executing the command, we can see that the "mywebtest" project has been created by the webapp archetype. If we examine the project, we can see that a webapp directory has been created in src/main. The is the web context directory for the project, and we can see that it contains a WEB-INF directory, which holds a default web.xmlW file.

'mywebtest' project has been created

The project's pom.xml file is shown below. Notice that the packaging is set to "war". This means that if a "mvn package" is performed, a warW file will be built for the project.


<project xmlns="" xmlns:xsi=""
  <name>mywebtest Maven Webapp</name>
Page: < 1 2