An easier way is the Maven Eclipse plugin (as opposed to the Maven plugin for Eclipse). It's just a maven plugin that generates a .project and .classpath file based on pom content, you just run mvn eclipse:eclipse , and you're done. It uses the classpath variable in Eclipse to find the local maven repository.
I personally prefer this approach most of the time because you have more control over updating maven plugins. This is also one less Eclipse plugin for the solution. The m2eclipse plug-in GUI features in the latest version are pretty nice.
There is also an alternative to the m2eclipse plugin called Q4E , now called the Eclipse IAM .
Ken liu
source share