Create Java Project using Maven in Eclipse

Posted on Updated on

When I started with Maven, I couldn’t understand a thing, Using Maven creating an eclipse project was the most difficult thing for me.

Today we will explore how quickly we can create a project using maven in eclipse.

What we need:

  1. JDK
  2. Maven Eclipse Plugin
  3. Maven
  4. Eclipse Indigo

I am using Eclipse Indigo but steps will remain the same for Eclipse Juno (4.2).

Assuming you have successfully installed Java, Eclipse, Maven, Maven plugin for Eclipse, start eclipse and follow steps outlined below:

  1. Create a new Maven Project

    1. Select “Create a simple project”
    2. Enter other information and click on finish
    3. Browse to the directory where you have created your project, for e.g. C:\Work\workspace\JPATestProject.
    4. Open command promt and type in

      mvn eclipse:eclipse

    5. Come back to eclipse and refresh your project, your eclipse project using Maven is ready
    6. Right click on your project – Build Path – Libraries – Add Library – Maven Managed Dependencies

4 thoughts on “Create Java Project using Maven in Eclipse

    phongW said:
    May 28, 2013 at 10:36 AM

    Thanks for your sharing. I liked it

    VIP said:
    January 7, 2014 at 10:12 PM

    Good work

    koteswararao said:
    March 24, 2014 at 3:07 PM

    great job

    RAj_RN said:
    April 13, 2015 at 1:51 PM

    Thank you for Sharing this its greate work i like it

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s