[jboss-cvs] JBossAS SVN: r80311 - trunk/server/src/main/org/jboss/web/deployers.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Oct 31 07:22:59 EDT 2008


Author: alesj
Date: 2008-10-31 07:22:59 -0400 (Fri, 31 Oct 2008)
New Revision: 80311

Modified:
   trunk/server/src/main/org/jboss/web/deployers/WARStructure.java
Log:
[EMBJOPR-21]; exclude jars from WEB-INF/lib/.../META-INF scan.

Modified: trunk/server/src/main/org/jboss/web/deployers/WARStructure.java
===================================================================
--- trunk/server/src/main/org/jboss/web/deployers/WARStructure.java	2008-10-31 10:38:18 UTC (rev 80310)
+++ trunk/server/src/main/org/jboss/web/deployers/WARStructure.java	2008-10-31 11:22:59 UTC (rev 80311)
@@ -48,6 +48,9 @@
    /** The web-inf/lib filter */
    private VirtualFileFilter webInfLibFilter = DEFAULT_WEB_INF_LIB_FILTER;
 
+   /** The web-inf/lib/[some-archive]/META-INF filter */
+   private VirtualFileFilter webInfLibMetaDataFilter = DEFAULT_WEB_INF_LIB_FILTER;
+
    /**
     * Sets the default relative order 1000.
     *
@@ -80,6 +83,26 @@
       this.webInfLibFilter = webInfLibFilter;
    }
 
+   /**
+    * Get webInfLibMetaDataFilter
+    *
+    * @return the webInfLibMetaDataFilter
+    */
+   public VirtualFileFilter getWebInfLibMetaDataFilter()
+   {
+      return webInfLibMetaDataFilter;
+   }
+
+   /**
+    * Set the webInfLibMetaDataFilter.
+    *
+    * @param webInfLibMetaDataFilter the webInfLibFilter.
+    */
+   public void setWebInfLibMetaDataFilter(VirtualFileFilter webInfLibMetaDataFilter)
+   {
+      this.webInfLibMetaDataFilter = webInfLibMetaDataFilter;
+   }
+
    public boolean determineStructure(StructureContext structureContext) throws DeploymentException
    {
       ContextInfo context = null;
@@ -148,7 +171,11 @@
                   archives = webinfLib.getChildren(webInfLibFilter);
                   // Add the jars' META-INF for metadata
                   for (VirtualFile jar : archives)
-                     metaDataLocations.add("WEB-INF/lib/" + jar.getName() + "/META-INF");
+                  {
+                     // either same as plain lib filter, null or accepts the jar
+                     if (webInfLibMetaDataFilter == webInfLibFilter || webInfLibMetaDataFilter == null || webInfLibMetaDataFilter.accepts(jar))
+                        metaDataLocations.add("WEB-INF/lib/" + jar.getName() + "/META-INF");
+                  }
                }
             }
             catch (IOException e)




More information about the jboss-cvs-commits mailing list