Create maven web application by using Eclipse

Open eclipse home page and proceed with the following steps:

Step1:Click Ctrl+N →type maven in serach box →open popup window of maven →select maven project.

It shows how to select a mvn project.

Step2:(Deselect option ‘Create a simple project’) and click next →

It procceds the process of creation of mvn project.

Step 3: Select ‘maven-archetype-webapp’

It shows types of mvn projects.

Step 4: Now enter ‘Group Id’ and ‘Artifact Id’ as mentioned below.

It shows window to type mvn project name and package(groupid).

Created web application successfully with project name ‘webapp’…

It shows created a mvn project.

Step 5: Right click on the project → Run on server. If u don’t have ‘Run on server’ option, please add plugin to project.
To get option ‘Run on server’, when you Right click on the project, follow below steps.

How to add plugin maven-eclipse:

Step1: Right click on the project->select “maven”->Add Plugin

It shows a wqindow of add pulgin.


Under serach box Enter groupId,artifact Id, and enter ‘maven-eclipse-plugin’
It shows the result of maven-eclipse-plugin.

Step 3: Select first Serach result “maven-eclipse-plugin, then →click on ok.

It shows which option you to select from the above result.

Step 4: Goto pom.xml →after version cmd(maven-eclipse-plugin) then add “configuration” and save it.

<configuration> <downloadSources>true</downloadSources> <downloadJavadocs>true</downloadJavadocs> <wtpversion>1.5</wtpversion> </configuration>
It what to type in pom.xml.

Step 5: Open cmd promt →goto project in which workspace (i.e location) Type “mvn eclipse:eclipse”.

Type “mvn eclipse:eclipse”.
Steps to add project location in command prompt:
Open command prompt
Type cd

type in the command pempt mvn eclipse:eclipse

Step 6: Right click on the project and then choose refresh option

refresh the project by right clicking n the project

Step 7: Then next change java version.. Right click on the project →properties →project facets →java →change 1.4 to change 1.6

by gogi8ng to project facet change the java version from 1.6 to 1.4

Step 8:Right click on the project → Run on server

run the project by by right clicking on the project

Step 9: Select tomcat v6.0 server at localhost

then select run on sever

Then click on finish..

Then it will display the default ‘index.jsp’ program output.

sample code in the project of html file

Output is shown below.

It shows the output.

Finally Maven has successfully installed...

HTML Comment Box is loading comments...