Author: markt
Date: Fri Jun 14 13:46:42 2013
New Revision: 1493069

URL: http://svn.apache.org/r1493069
Log:
Container provided JARs should not be scanned for deployment annotations.

Modified:
    tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java

Modified: tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java?rev=1493069&r1=1493068&r2=1493069&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java (original)
+++ tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java Fri Jun 14 
13:46:42 2013
@@ -2031,16 +2031,20 @@ public class ContextConfig implements Li
     protected void processAnnotations(Set<WebXml> fragments,
             boolean handlesTypesOnly) {
         for(WebXml fragment : fragments) {
-            WebXml annotations = new WebXml();
-            // no impact on distributable
-            annotations.setDistributable(true);
-            URL url = fragment.getURL();
-            processAnnotationsUrl(url, annotations,
-                    (handlesTypesOnly || fragment.isMetadataComplete()));
-            Set<WebXml> set = new HashSet<>();
-            set.add(annotations);
-            // Merge annotations into fragment - fragment takes priority
-            fragment.merge(set);
+            if (fragment.getWebappJar()) {
+                // Only web application JARs should be scanned for deployment
+                // annotations
+                WebXml annotations = new WebXml();
+                // no impact on distributable
+                annotations.setDistributable(true);
+                URL url = fragment.getURL();
+                processAnnotationsUrl(url, annotations,
+                        (handlesTypesOnly || fragment.isMetadataComplete()));
+                Set<WebXml> set = new HashSet<>();
+                set.add(annotations);
+                // Merge annotations into fragment - fragment takes priority
+                fragment.merge(set);
+            }
         }
     }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to