Maven Plugins and Eclipse

I have long meant to add this blog entry... Java newcomers are often confused by two different plugins that share VERY similar names... I can't even remember which is which based on their names alone:
Originally, the question was "which of these plugins should I use? or both?"  The answer has always been that the Maven Eclipse plugin should be solely sufficient if you are using Eclipse as your IDE with Maven projects.  This plugin duplicated the only feature provided by "the other" plugin, thereby rendering it pretty pointless.  (But, to be fair, "the other" plugin came first and filled a need at the time)

maven-eclipse-plugin

Note:  As of 7/31/208 (maybe as far back as 5/28/2015), this plugin is RETIRED and no longer maintained.

As its website states:
The Maven Eclipse Plugin is used to generate Eclipse IDE files (*.classpath, *.project, *.wtpmodules and the .settings folder) for use with a project.
In other words, if you have a Maven-ized project that you are not yet using with Eclipse, you can use this maven plugin to "pre-generate" Eclipse IDE files so that you can open/use the project in Eclipse.  This is a "one-time" conversion; once the files are generated with the plugin, you should not need to do so again.

Maven Eclipse plugin

This is an actual plugin for Eclipse.  It serves two purposes:
  • Allows you to open Maven projects in Eclipse (and in the process, it does the same thing that maven-eclipse-plugin does - namely, does a one-time create of Eclipse IDE project files)
  • Understands your local Maven installation and provides various features for configuring your local Maven installation. Also, and more importantly, this plugin allows you to run Maven(mvn) commands via your IDE's GUI.  Some of the most common commands are 'mvn clean' and 'mvn install'.
See this dated article for some history regarding m2eclipse.

Comments

Popular Posts