Monday, April 14, 2008

IllegalStateException: The PluginDescriptor for the plugin ... was not found

Ever saw this error?

java.lang.IllegalStateException: The PluginDescriptor for the plugin Plugin [org.apache.maven.plugins:maven-resources-plugin] was not found.
        at org.apache.maven.plugin.DefaultPluginManager.addPlugin(
        at org.apache.maven.plugin.DefaultPluginManager.verifyVersionedPlugin(
        at org.apache.maven.plugin.DefaultPluginManager.verifyPlugin(
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.getMojoDescriptor(
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.bindLifecycleForPackaging(
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.constructLifecycleMappings(
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(
        at org.apache.maven.DefaultMaven.doExecute(
        at org.apache.maven.DefaultMaven.execute(
        at org.apache.maven.cli.MavenCli.main(

When you see this, check:

  1. That the JAR file of the plug-in is okay and that it contains a file META-INF/maven/plugin.xml
  2. That the pom.xml of the plug-in exists and is valid.
  3. That all parent POMs exist and are valid.

Good luck. I've opened this issue to get a better error message.


Maarten Storm said...

I had the same problem, just run this command mvn clean package install . I think that the install will not generate the plugin descriptor, package phase does this.

see for more on

it worked for me

lovetamil said...

Hi it is very nice,

i'm getting some other plugin(net.sourceforge.cobertura) error, i'm not haveing any plugin.xml in my package, can you send me simple code for implementing cobertura with maven

Aaron Digulla said...

As I said: The file "plugin.xml" must be in the JAR file of the maven plugin which your project uses. Run maven with -X to see which JARs it tries to load and then check that the files are not corrupt as I explained above.

For an example how to use cobertura, see the usage page of cobertura.