mirror of https://github.com/apache/maven.git
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:
parent
58a24ac941
commit
8b88d97c41
|
@ -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 );
|
||||
|
|
Loading…
Reference in New Issue