You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by jd...@apache.org on 2006/12/13 08:40:12 UTC

svn commit: r486532 - /geronimo/genesis/trunk/plugins/tools-maven-plugin/src/main/java/org/apache/geronimo/genesis/plugins/tools/VerifyLegalFilesMojo.java

Author: jdillon
Date: Tue Dec 12 23:40:11 2006
New Revision: 486532

URL: http://svn.apache.org/viewvc?view=rev&rev=486532
Log:
Check META-INF and / (needed for assemblies)

Modified:
    geronimo/genesis/trunk/plugins/tools-maven-plugin/src/main/java/org/apache/geronimo/genesis/plugins/tools/VerifyLegalFilesMojo.java

Modified: geronimo/genesis/trunk/plugins/tools-maven-plugin/src/main/java/org/apache/geronimo/genesis/plugins/tools/VerifyLegalFilesMojo.java
URL: http://svn.apache.org/viewvc/geronimo/genesis/trunk/plugins/tools-maven-plugin/src/main/java/org/apache/geronimo/genesis/plugins/tools/VerifyLegalFilesMojo.java?view=diff&rev=486532&r1=486531&r2=486532
==============================================================================
--- geronimo/genesis/trunk/plugins/tools-maven-plugin/src/main/java/org/apache/geronimo/genesis/plugins/tools/VerifyLegalFilesMojo.java (original)
+++ geronimo/genesis/trunk/plugins/tools-maven-plugin/src/main/java/org/apache/geronimo/genesis/plugins/tools/VerifyLegalFilesMojo.java Tue Dec 12 23:40:11 2006
@@ -111,8 +111,18 @@
     private boolean containsLegalFiles(final ZipFile file) throws IOException {
         assert file != null;
 
+        // First check in META-INF
         for (int i=0; i < LEGAL_FILES.length; i++) {
             ZipEntry entry = file.getEntry("META-INF/" + LEGAL_FILES[i]);
+            if (entry != null) {
+                // found one, thats all we need
+                return true;
+            }
+        }
+
+        // Then root (needed for assemblies)
+        for (int i=0; i < LEGAL_FILES.length; i++) {
+            ZipEntry entry = file.getEntry(LEGAL_FILES[i]);
             if (entry != null) {
                 // found one, thats all we need
                 return true;