Share on Google+Share on Google+

How to create Maven Web Application in Eclipse?

Learn How to create Maven Web Application in Eclipse? This video instruction explains you the steps to create a Maven application in Eclipse.

In this tutorial you will learn "How to create Maven Web Application in Eclipse?" and then deploy it on the embedded tomcat or on third party server. Maven 3 is project management tool for managing the lifecycle of the Software development project. It provides the tool for dependency management, project building, testing and deployment.

Maven helps the developer to automate the repeated work involved in the software development. Here today we will teach you how you can use the Maven 3 in the Eclipse IDE.

I am assuming that you have JDK, Maven 3 and Eclipse installed on your computer.

Here is the brief steps:

1. We will use the Maven 3 to create the web application.

2. Then convert the web application into Eclipse Project.

3. Import the project in Eclipse and then run it from Eclipse.

How to create Maven Web Application in Eclipse?

Here is the video instruction of creating the maven web application and running it through Eclipse:

Here are the steps to create project:

Step 1: Create maven web application through following command in the console

mvn archetype:generate -DgroupId=net.roseindia -DartifactId=eclipsemavenexample 
-DarchetypeArtifactId=maven-archetype-webapp -DinteractiveMode=false

Step 2: Go to the directory where project has been created

cd eclipsemavenexample

and then use the following command to create the project for Eclipse:

mvn eclipse:eclipse -Dwtpversion=2.0

Step 3: Now import the project in Eclipse and then copy can compile the project there using Maven. You can also run the project in the embedded tomcat as shown below:

maven example in eclipse

In the video instruction of this tutorial (video is embedded in this page above) you will find the complete instruction. So, don't miss and see the video for understanding the complete process.

Download the source code of the Maven 3 Eclipse example.

Check more tutorials of Maven 3.



Posted on: July 29, 2014 If you enjoyed this post then why not add us on Google+? Add us to your Circles

Share this Tutorial Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Discuss: How to create Maven Web Application in Eclipse?  

Post your Comment

Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image