Changing from m2eclipse to m2e (Eclipse 3.7 - Indigo)

Yesterday I switched from Eclipse 3.6. (Helios) to the new Eclipse version 3.7. (Indigo)and I experienced some problems with the maven integration for Eclipse. In 3.7 Sonatype's m2eclipse plugin, which I used before, was integrated in the Indigo release train and is now available on the standard eclipse update site. Unfortunately there seems to be some incompatibility between the "old" m2eclipse plugin and the "new" m2e plugin which comes with Eclipse Indigo.

Eclipse Indigo

First of all, the existing maven runtime configurations disappeared. This isn't that bad (for me), but it's still something one should be aware of, when switching to the new version. Second of all, the projects managed by maven, could not be launched anymore (via "Launch as Java Application"). An error message

Referenced classpath provider does not exist: org.maven.ide.eclipse.launchconfig.classpathProvider

occurs. The reason seems to be that the namespace of the plugin changed and all launch configuration still point to the old plugin's name. If you have look inside the .launch files within the


directory you will find something like the following snippet:

<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" 
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" 

...where it actually should be...

<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" 
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" 

As you can see the plugin's namespace changed from org.maven.ide.eclipse to org.eclipse.m2e which causes these problems.

A simple solution to get your launch configurations running again, is to right click on your project within the IDE and then choose Configure -> Convert to Maven Project. This fixes the broken launch configuration and also brings back the "Maven" context menu entry for the project.

In order to get your lost maven run configurations back, you have to edit the regarding ".launch"-files. As mentioned above these files are located in the ".launches" directory within the "org.eclipse.debug.core" folder. The files are named after the launch configuration. Change the line 

<launchConfiguration type="org.maven.ide.eclipse.Maven2LaunchConfigurationType">

<launchConfiguration type="org.eclipse.m2e.Maven2LaunchConfigurationType">

After restarting the Eclipse IDE your maven launch configurations should be available again.

Sven Hoffmann

Sven Hoffmann

Fri Jun 24 10:49:00 CEST 2011 • Fri Jun 24 10:49:00 CEST 2011

Eclipse, Java