From 9ebabd646ff2b7340ca6e3230c72ccb584bfcb7f Mon Sep 17 00:00:00 2001 From: Benjamin Bentmann Date: Sun, 22 Feb 2009 18:41:03 +0000 Subject: [PATCH] [MPLUGIN-110] Make easier to pass parameters into MojoDescriptorExtractors o Catched potential linkage error when users update the plugin version but forget the dependencies and provide a more helpful error message git-svn-id: https://svn.apache.org/repos/asf/maven/plugin-tools/trunk@746796 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/maven/plugin/plugin/AbstractGeneratorMojo.java | 6 ++++++ 1 file changed, 6 insertions(+) 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 ); + } } + }