You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by be...@apache.org on 2010/05/16 15:15:38 UTC

svn commit: r944825 [1/3] - in /maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade: mojo/ShadeMojo.java pom/MavenJDOMWriter.java resource/ApacheNoticeResourceTransformer.java resource/XmlAppendingTransformer.java

Author: bentmann
Date: Sun May 16 13:15:38 2010
New Revision: 944825

URL: http://svn.apache.org/viewvc?rev=944825&view=rev
Log:
o Formatted/polished code

Modified:
    maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/mojo/ShadeMojo.java
    maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/pom/MavenJDOMWriter.java
    maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/resource/ApacheNoticeResourceTransformer.java
    maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/resource/XmlAppendingTransformer.java

Modified: maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/mojo/ShadeMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/mojo/ShadeMojo.java?rev=944825&r1=944824&r2=944825&view=diff
==============================================================================
--- maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/mojo/ShadeMojo.java (original)
+++ maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/mojo/ShadeMojo.java Sun May 16 13:15:38 2010
@@ -365,8 +365,8 @@ public class ShadeMojo
                 getLog().error( "- You have bound the goal to a lifecycle phase before \"package\". Please" );
                 getLog().error( "  remove this binding from your POM such that the goal will be run in" );
                 getLog().error( "  the proper phase." );
-                throw new MojoExecutionException( "Failed to create shaded artifact.",
-                                                  new IllegalStateException( "Project main artifact does not exist." ) );
+                throw new MojoExecutionException( "Failed to create shaded artifact, "
+                    + "project main artifact does not exist." );
             }
 
             artifacts.add( project.getArtifact().getFile() );
@@ -441,7 +441,8 @@ public class ShadeMojo
                 // rename the output file if a specific finalName is set
                 // but don't rename if the finalName is the <build><finalName>
                 // because this will be handled implicitely later
-                if ( finalName != null && finalName.length() > 0 && !finalName.equals( project.getBuild().getFinalName() ) )
+                if ( finalName != null && finalName.length() > 0
+                    && !finalName.equals( project.getBuild().getFinalName() ) )
                 {
                     String finalFileName = finalName + "." + project.getArtifact().getArtifactHandler().getExtension();
                     File finalFile = new File( outputDirectory, finalFileName );