Maven Integration for Eclipse( M2Eclipse) – Plugin Installation

I was looking for Maven eclipse plugin for a while, M2Eclipse suits to my requirement.

Steps for M2Eclipse installation in Eclipse 3.5.x.

  1. Open Help->  Install New Software…
  2. Click Add
  3. Enter Name as M2E & Location as http://m2eclipse.sonatype.org/sites/m2e/ (for Eclipse 3.5 & 3.6)
    1. For Eclipse 3.4 – http://m2eclipse.sonatype.org/sites/m2e-e34/
  4. Follow rest of instructions and complete the installation.
  5. After successful installation, verify that Maven menu is displayed in Windows ->Preferences.
  6. Set the User Settings(Maven -> User Settings) to point to right settings.xml

Once all are set, we can create a Maven project using File -> New -> Projects… > Maven -> Maven Project.

Follow the default options and create it. Maven may update the indexes by fetching it from the repositories. Allow them to continue to work in the background so that we can get to know about available groups, artifacts ids from the repository(s).

Now the new maven project is set, we can able to add dependencies, plugin etc by Right click -> Maven.

We can perform maven operations like install, clean, build etc by Right click maven project -> Run As.

Sometimes we don’t want our artifacts to be updated every time fetching from the repositories, We can set Maven to offline to achieve it through Windows -> Preferences -> Maven -> Choose Maven offline enabled.

That’s all.

Advertisements

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s

%d bloggers like this: