You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by hb...@apache.org on 2012/08/01 23:32:35 UTC
svn commit: r1368261 -
/maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/AbstractDependencyMojo.java
Author: hboutemy
Date: Wed Aug 1 21:32:35 2012
New Revision: 1368261
URL: http://svn.apache.org/viewvc?rev=1368261&view=rev
Log:
[MDEP-98] improved error message to describe the real cause of the problem
Modified:
maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/AbstractDependencyMojo.java
Modified: maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/AbstractDependencyMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/AbstractDependencyMojo.java?rev=1368261&r1=1368260&r2=1368261&view=diff
==============================================================================
--- maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/AbstractDependencyMojo.java (original)
+++ maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/AbstractDependencyMojo.java Wed Aug 1 21:32:35 2012
@@ -173,6 +173,7 @@ public abstract class AbstractDependency
if ( artifact.isDirectory() )
{
+ // usual case is a future jar packaging, but there are special cases: classifier and other packaging
throw new MojoExecutionException( "Artifact has not been packaged yet. When used on reactor artifact, "
+ "copy should be executed after packaging: see MDEP-187." );
}
@@ -210,6 +211,13 @@ public abstract class AbstractDependency
location.mkdirs();
+ if ( file.isDirectory() )
+ {
+ // usual case is a future jar packaging, but there are special cases: classifier and other packaging
+ throw new MojoExecutionException( "Artifact has not been packaged yet. When used on reactor artifact, "
+ + "unpack should be executed after packaging: see MDEP-98." );
+ }
+
UnArchiver unArchiver;
unArchiver = archiverManager.getUnArchiver( file );
@@ -251,7 +259,6 @@ public abstract class AbstractDependency
}
catch ( ArchiverException e )
{
- e.printStackTrace();
throw new MojoExecutionException(
"Error unpacking file: " + file + " to: " + location + "\r\n" + e.toString(), e );
}