improved error message

git-svn-id: https://svn.apache.org/repos/asf/maven/plugin-tools/trunk@1343166 13f79535-47bb-0310-9956-ffa450edef68
master
Herve Boutemy 2012-05-28 08:54:25 +00:00
parent 09b55931a9
commit 6c06f4bcdd
1 changed files with 6 additions and 5 deletions

View File

@ -230,12 +230,13 @@ public class JavaMojoDescriptorExtractor
if ( executePhase == null && executeGoal == null )
{
throw new InvalidPluginDescriptorException( "@execute tag requires a 'phase' or 'goal' parameter" );
throw new InvalidPluginDescriptorException( javaClass.getFullyQualifiedName()
+ ": @execute tag requires either a 'phase' or 'goal' parameter" );
}
else if ( executePhase != null && executeGoal != null )
{
throw new InvalidPluginDescriptorException(
"@execute tag can have only one of a 'phase' or 'goal' parameter" );
throw new InvalidPluginDescriptorException( javaClass.getFullyQualifiedName()
+ ": @execute tag can have only one of a 'phase' or 'goal' parameter" );
}
mojoDescriptor.setExecutePhase( executePhase );
mojoDescriptor.setExecuteGoal( executeGoal );
@ -246,8 +247,8 @@ public class JavaMojoDescriptorExtractor
mojoDescriptor.setExecuteLifecycle( lifecycle );
if ( mojoDescriptor.getExecuteGoal() != null )
{
throw new InvalidPluginDescriptorException(
"@execute lifecycle requires a phase instead of a goal" );
throw new InvalidPluginDescriptorException( javaClass.getFullyQualifiedName()
+ ": @execute lifecycle requires a phase instead of a goal" );
}
}
}