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.
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
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:
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.
Posted on: July 29, 2014 If you enjoyed this post then why not add us on Google+? Add us to your Circles