Create Java Project using Maven in Eclipse

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

There are 4 comments

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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