Create Maven Project in Eclipse

In this tutorial, You will see, How can you create Maven Project in Eclipse.

It’s very simple to create the Maven Project in eclipse, You need to follow the procedure to create the Maven project in Eclipse.

 

First, Eclipse should be already installed and configured on your machine. Java 6 or higher version should be installed on your machine.

The Eclipse IDE provides excellent support for the Maven.

Create Maven Project in Eclipse

Let’s see the steps, You need to follow to create the Maven Project in Eclipse.

  1. Open the Eclipse IDE.

  2. Click on File -> New -> Other…

  3. Inside the Other, you will get the new window.

  4. Now Search for “Maven” in the wizard.

  5. Once you will get the Maven Folder. Click on it expands its option.

  6. In the above Window, Select the “Maven Project” and click on next.

    Create Maven Project in Eclipse

     

  7.  You will get the new window title New Maven Project. Click on next.

  8. Click on next one more time. Now you will get the below attached window.

  9. Here, Enter your groupId, artifact ID & version.

Create Maven Project in Eclipse

 

Now, Click on Finish button.

Now you will see a maven project with the complete directory structure. All the files will be created automatically such as Hello Java file, pom.xml file, test case file etc. The directory structure of the maven project is shown in the below figure.

Create Maven Project in Eclipse

 

You can see, Your whole project is configured and compiled automatically.

 

Now if you would like to run your project then you just need to Right-Click your project and navigate to Run As .

You will get the below-attached options. You can choose anyone as per your need.

Create Maven Project in Eclipse

 

0 Comment

Leave a Reply