You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ah...@apache.org on 2013/06/03 12:46:25 UTC
[44/50] git commit: [MNG-5482] detect missing Sonatype Aether classes
to give a hint to AetherClassNotFound Wiki article
[MNG-5482] detect missing Sonatype Aether classes to give a hint to
AetherClassNotFound Wiki article
Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/ac64dd6b
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/ac64dd6b
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/ac64dd6b
Branch: refs/heads/slf4j-log4j2
Commit: ac64dd6bb6096e8dbd54e3520208e5737fb1c804
Parents: 22d74b0
Author: Hervé Boutemy <hb...@apache.org>
Authored: Thu May 30 03:10:51 2013 +0200
Committer: Hervé Boutemy <hb...@apache.org>
Committed: Thu May 30 03:10:51 2013 +0200
----------------------------------------------------------------------
.../maven/exception/DefaultExceptionHandler.java | 19 ++++++++++++++-
1 files changed, 18 insertions(+), 1 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/maven/blob/ac64dd6b/maven-core/src/main/java/org/apache/maven/exception/DefaultExceptionHandler.java
----------------------------------------------------------------------
diff --git a/maven-core/src/main/java/org/apache/maven/exception/DefaultExceptionHandler.java b/maven-core/src/main/java/org/apache/maven/exception/DefaultExceptionHandler.java
index 6066593..5452fdf 100644
--- a/maven-core/src/main/java/org/apache/maven/exception/DefaultExceptionHandler.java
+++ b/maven-core/src/main/java/org/apache/maven/exception/DefaultExceptionHandler.java
@@ -31,6 +31,7 @@ import org.apache.maven.model.building.ModelProblemUtils;
import org.apache.maven.plugin.AbstractMojoExecutionException;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
+import org.apache.maven.plugin.PluginContainerException;
import org.apache.maven.plugin.PluginExecutionException;
import org.apache.maven.project.ProjectBuildingException;
import org.apache.maven.project.ProjectBuildingResult;
@@ -198,7 +199,23 @@ public class DefaultExceptionHandler
}
else if ( exception instanceof PluginExecutionException )
{
- reference = getReference( exception.getCause() );
+ Throwable cause = exception.getCause();
+
+ if ( cause instanceof PluginContainerException )
+ {
+ Throwable cause2 = cause.getCause();
+
+ if ( cause2 instanceof NoClassDefFoundError
+ && cause2.getMessage().contains( "org/sonatype/aether/" ) )
+ {
+ reference = "AetherClassNotFound";
+ }
+ }
+
+ if ( StringUtils.isEmpty( reference ) )
+ {
+ reference = getReference( cause );
+ }
if ( StringUtils.isEmpty( reference ) )
{