Telling Maven Integration plugin for Eclipse where Maven installation directory is under Ubuntu

The Maven plugin for Eclipse by default uses an embedded Maven installation which is Maven 3.0. It turns out this has some incompatibilities with Maven 2.x and you are likely better off using Maven 2.x, which is fortunately still the version in the Ubuntu repository.

To specify which Maven installation to use in Eclipse, go to Window -> Preferences -> Maven -> Installations. Click Add. The default Maven installation directory for Ubuntu is /etc/share/maven2. If you input the wrong directory you will get a "The selected directory is not a valid Maven directory" error message.