o Extended error message to help diagnose bad class realms

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-3/trunk@820600 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Benjamin Bentmann 2009-10-01 10:47:10 +00:00
parent 58a24ac941
commit 8b88d97c41
1 changed files with 10 additions and 0 deletions

View File

@ -116,6 +116,16 @@ public class DefaultBuildPluginManager
throw new PluginExecutionException( mojoExecution, project, os.toString(), e );
}
catch ( ClassCastException e )
{
ByteArrayOutputStream os = new ByteArrayOutputStream( 1024 );
PrintStream ps = new PrintStream( os );
ps.println( "A type incompatibility occured while executing " + mojoDescriptor.getId() );
ps.println( e );
pluginRealm.display( ps );
throw new PluginExecutionException( mojoExecution, project, os.toString(), e );
}
finally
{
mavenPluginManager.releaseMojo( mojo, mojoExecution );