views:

62

answers:

1

When I try and generate the Eclipse project files using mvn eclipse:eclipse I get the following error:

Internal error in the plugin manager executing goal 'org.apache.maven.plugins:maven-eclipse-plugin:2.9-SNAPSHOT:eclipse': Unable to load the mojo 'org.apache.maven.plugins:maven-eclipse-plugin:2.9-SNAPSHOT:eclipse' in the plugin 'org .apache.maven.plugins:maven-eclipse-plugin'. A required class is missing: org/codehaus/plexus/resource/loader/ResourceNotFoundException

It appears that I'm using version 2.9-SNAPSHOT of the Maven Eclipse plugin. My guess is that there is a bug in this version of the plugin and if I use a stable release (instead of a snapshot), the problem will be resolved. Is there a way that I can change the version of this plugin I'm using, or is this problem unrelated to the version of the Eclipse plugin?

+3  A: 

Either use the fully qualified name of the plugin to specify the version:

$ mvn org.apache.maven.plugins:maven-eclipse-plugin:2.8:eclipse

Or edit the ~/.m2/plugin-registry.xml file (for advanced users, make a backup).

Or try the -npr,--no-plugin-registry options to tell maven to not use ~/.m2/plugin-registry.xml for plugin versions:

$ mvn -npr eclipse:eclipse

But I don't guarantee a successful result. See the Introduction to the Plugin Registry for more details.

Or remove the version 2.9-SNAPSHOT from your local repository:

$ rm -rf ~/.m2/repository/org/apache/maven/plugins/maven-eclipse-plugin/2.9-SNAPSHOT
Pascal Thivent