tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1382587 - in /tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources: DirResourceSet.java FileResource.java
Date Sun, 09 Sep 2012 21:54:15 GMT
Author: markt
Date: Sun Sep  9 21:54:15 2012
New Revision: 1382587

URL: http://svn.apache.org/viewvc?rev=1382587&view=rev
Log:
Special case to handle Resource JARs that have been unpacked under /WEB-INF/classes
Eclipse requires this

Modified:
    tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/DirResourceSet.java
    tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/FileResource.java

Modified: tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/DirResourceSet.java
URL: http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/DirResourceSet.java?rev=1382587&r1=1382586&r2=1382587&view=diff
==============================================================================
--- tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/DirResourceSet.java
(original)
+++ tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/DirResourceSet.java
Sun Sep  9 21:54:15 2012
@@ -22,6 +22,7 @@ import java.util.Set;
 
 import org.apache.catalina.WebResource;
 import org.apache.catalina.WebResourceRoot;
+import org.apache.catalina.WebResourceRoot.ResourceSetType;
 import org.apache.catalina.WebResourceSet;
 import org.apache.catalina.util.ResourceSet;
 
@@ -43,6 +44,16 @@ public class DirResourceSet implements W
         }
         this.base = base;
         this.webAppMount = webAppMount;
+
+        // Special case to handle Resource JARs that have been unpacked under
+        // /WEB-INF/classes
+        WebResource unpackedResourceJar =
+                getResource("/WEB-INF/classes/META-INF/resources");
+        if (unpackedResourceJar.exists()) {
+            root.createWebResourceSet(ResourceSetType.RESOURCE_JAR,
+                    ((FileResource) unpackedResourceJar).getResourceInternal() ,
+                    "", "");
+        }
     }
 
     @Override

Modified: tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/FileResource.java
URL: http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/FileResource.java?rev=1382587&r1=1382586&r2=1382587&view=diff
==============================================================================
--- tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/FileResource.java
(original)
+++ tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/FileResource.java
Sun Sep  9 21:54:15 2012
@@ -162,4 +162,8 @@ public class FileResource implements Web
     public WebResourceRoot getWebResourceRoot() {
         return root;
     }
+
+    protected File getResourceInternal() {
+        return resource;
+    }
 }



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


Mime
View raw message