Open In App
Related Articles

How to Create a Maven Project in Eclipse IDE?

Improve Article
Save Article
Like Article

Maven is a powerful project management tool that is based on POM (project object model). It is used for project build, dependency, and documentation. It simplifies the build process like ANT. But it is too much advanced than ANT. In short terms we can tell maven is a tool that can be used for building and managing any Java-based project. maven make the day-to-day work of Java developers easier and generally help with the comprehension of any Java-based project. Read more about maven here: Introduction to Apache Maven. In this article, we will see how we can create a maven project using Eclipse IDE.

Step By Step Implementation

Step 1: Create A New Maven Project

First, we will create a new maven project. For this, we will open our Eclipse IDE then Go to File > New > Maven Project

Fig 1 - New Maven Project

Fig 1 – New Maven Project

Once we click on Maven Project we will get a prompt for setting up our Workspace location.

Fig 2 – Workspace Prompt

After setting Workspace location according to our choice. We will click on Next to go to further project setup steps.

Step 2: Setting Up Archetype

In this step, we will setup the archetype for our maven project. Archetype is a templating toolkit. It provides a templating solution for your project and helps to create a sample project structure that you can extend based on your business requirements. For this tutorial, we will use the maven-archetype-j2ee-simple archetype for our project.

Fig 3 - Archetype Selection

Fig 3 – Archetype Selection

After choosing the archetype we will click on Next and it will ask for the details like Group Id, Artifact Id, and Package information.

  • Group Id – It’s a unique identifier to uniquely identify the project in a maven repository.
  • Artifact Id – It’s basically the project name.

For this tutorial, we will be using the following details.

Fig 4 – Maven Project Details

After adding all these details we need to click on the Finish button. Maven will start creating your project and after a few seconds, your project will be created.

Fig 5 - Maven Project

Fig 5 – Maven Project

Last Updated : 02 Mar, 2022
Like Article
Save Article
Similar Reads
Related Tutorials