mirror of https://github.com/apache/maven.git
o Fixed exception reporting
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@801591 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
e3b41a9457
commit
cbfc593e6e
|
@ -30,6 +30,7 @@ import org.apache.maven.plugin.PluginDescriptorParsingException;
|
||||||
import org.apache.maven.plugin.PluginNotFoundException;
|
import org.apache.maven.plugin.PluginNotFoundException;
|
||||||
import org.apache.maven.plugin.PluginResolutionException;
|
import org.apache.maven.plugin.PluginResolutionException;
|
||||||
import org.codehaus.plexus.component.annotations.Component;
|
import org.codehaus.plexus.component.annotations.Component;
|
||||||
|
import org.codehaus.plexus.util.StringUtils;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
||||||
|
@ -124,10 +125,20 @@ public class DefaultExceptionHandler
|
||||||
else if ( exception instanceof MojoFailureException )
|
else if ( exception instanceof MojoFailureException )
|
||||||
{
|
{
|
||||||
message = ((MojoFailureException)exception).getLongMessage();
|
message = ((MojoFailureException)exception).getLongMessage();
|
||||||
|
|
||||||
|
if ( StringUtils.isEmpty( message ) )
|
||||||
|
{
|
||||||
|
message = exception.getMessage();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if ( exception instanceof MojoExecutionException )
|
else if ( exception instanceof MojoExecutionException )
|
||||||
{
|
{
|
||||||
message = ((MojoExecutionException)exception).getLongMessage();
|
message = ((MojoExecutionException)exception).getLongMessage();
|
||||||
|
|
||||||
|
if ( StringUtils.isEmpty( message ) )
|
||||||
|
{
|
||||||
|
message = exception.getMessage();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue