maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snic...@apache.org
Subject svn commit: r485215 - /maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/EarMojo.java
Date Sun, 10 Dec 2006 16:57:47 GMT
Author: snicoll
Date: Sun Dec 10 08:57:44 2006
New Revision: 485215

URL: http://svn.apache.org/viewvc?view=rev&rev=485215
Log:
MEAR-49: Preventing artifacts to be zeroed if source and destination refer to the same file.
Submitted by: Ian Springer
Reviewed by: Stephane Nicoll

Modified:
    maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/EarMojo.java

Modified: maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/EarMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/EarMojo.java?view=diff&rev=485215&r1=485214&r2=485215
==============================================================================
--- maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/EarMojo.java
(original)
+++ maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/EarMojo.java
Sun Dec 10 08:57:44 2006
@@ -197,7 +197,13 @@
                         "; Did you package/install " + module.getArtifact() + "?" );
                 }
 
-                // If the module is within the unpack, list make sure that no unpack wasn't
forced (null or true)
+                if (destinationFile.getCanonicalPath().equals(sourceFile.getCanonicalPath()))
+                {
+                    getLog().info( "Skipping artifact[" + module + "], as it already exists
at[" + module.getUri() + "]" );
+                    continue;
+                }
+
+                // If the module is within the unpack list, make sure that no unpack wasn't
forced (null or true)
                 // If the module is not in the unpack list, it should be true
                 if ( ( unpackTypesList.contains( module.getType() ) &&
                     ( module.shouldUnpack() == null || module.shouldUnpack().booleanValue()
) ) ||



Mime
View raw message