diff --git a/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/AbstractGeneratorMojo.java b/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/AbstractGeneratorMojo.java index 39a693d..9965c1b 100644 --- a/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/AbstractGeneratorMojo.java +++ b/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/AbstractGeneratorMojo.java @@ -188,5 +188,11 @@ public abstract class AbstractGeneratorMojo throw new MojoExecutionException( "Error extracting plugin descriptor: \'" + e.getLocalizedMessage() + "\'", e ); } + catch ( LinkageError e ) + { + throw new MojoExecutionException( "The API of the mojo scanner is not compatible with this plugin version." + + " Please check the plugin dependencies configured in the POM and ensure the versions match.", e ); + } } + }