From f7d7cbb6a0753272a4b5a241381cf3dd315da214 Mon Sep 17 00:00:00 2001 From: Benjamin Bentmann Date: Thu, 22 Oct 2009 10:29:34 +0000 Subject: [PATCH] o Improved error message git-svn-id: https://svn.apache.org/repos/asf/maven/maven-3/trunk@828642 13f79535-47bb-0310-9956-ffa450edef68 --- .../plugin/internal/DefaultMavenPluginManager.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultMavenPluginManager.java b/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultMavenPluginManager.java index 9ed07f4cdd..6d70e796f4 100644 --- a/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultMavenPluginManager.java +++ b/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultMavenPluginManager.java @@ -636,9 +636,14 @@ public class DefaultMavenPluginManager } catch ( ComponentConfigurationException e ) { - throw new PluginConfigurationException( mojoDescriptor.getPluginDescriptor(), - "Unable to parse configuration of mojo " + mojoDescriptor.getId() - + ": " + e.getMessage(), e ); + String message = "Unable to parse configuration of mojo " + mojoDescriptor.getId(); + if ( e.getFailedConfiguration() != null ) + { + message += " for parameter " + e.getFailedConfiguration().getName(); + } + message += ": " + e.getMessage(); + + throw new PluginConfigurationException( mojoDescriptor.getPluginDescriptor(), message, e ); } catch ( ComponentLookupException e ) {