Author: dfabulich
Date: Mon Dec 10 23:47:48 2007
New Revision: 603163

URL: http://svn.apache.org/viewvc?rev=603163&view=rev
Log:
[MSHADE-6] Replacement failures should halt the build

Modified:
    
maven/sandbox/trunk/plugins/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/mojo/ShadeMojo.java

Modified: 
maven/sandbox/trunk/plugins/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/mojo/ShadeMojo.java
URL: 
http://svn.apache.org/viewvc/maven/sandbox/trunk/plugins/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/mojo/ShadeMojo.java?rev=603163&r1=603162&r2=603163&view=diff
==============================================================================
--- 
maven/sandbox/trunk/plugins/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/mojo/ShadeMojo.java
 (original)
+++ 
maven/sandbox/trunk/plugins/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/mojo/ShadeMojo.java
 Mon Dec 10 23:47:48 2007
@@ -288,7 +288,7 @@
                 
                 if ( !outputJar.renameTo( file ) )
                 {
-                    getLog().warn( "Could not replace original artifact with 
shaded artifact!" );
+                    throw new MojoExecutionException( "Could not replace 
original artifact with shaded artifact!" );
                 }
                 
                 if ( createSourcesJar ) 
@@ -298,7 +298,7 @@
                     
                     if ( !sourcesJar.renameTo( file ) )
                     {
-                        getLog().warn( "Could not replace original sources 
artifact with shaded artifact!" );
+                        throw new MojoExecutionException( "Could not replace 
original sources artifact with shaded artifact!" );
                     }
                     projectHelper.attachArtifact( project, "jar",
                                                   "sources", file );


Reply via email to