When you integrate MAVEN, Eclipse installs the last inline maven, which is usually newer, but not necessarily stable, and is often not the same as the one used by the command line. There are two potential problems: first, newer versions of Maven have a number of destabilizing factors that are prone to difficult-to-understand problems, and second, the command-line maven is often used in addition to the IDE, and if the versions are inconsistent, it is easy to create inconsistencies in the build behavior. Therefore, you should use Maven consistent with the command line when you configure the MAVEN plug-in in the IDE.
In the M2ECLIPSE environment,
- Window->preferences
- In the dialog box that pops up, expand the MAVEN item on the left, select the installation subkey
- In the right panel, click Add ... Add external Maven
- In the popup dialog box, select Installation home to
- Then click Finish to return to the Preferences dialog box and select the installation you just added as the default installation
Configure Eclipse to use external maven