geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmcma...@apache.org
Subject svn commit: r583532 - in /geronimo/server/trunk: modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/classloader/UrlResourceFinder.java pom.xml
Date Wed, 10 Oct 2007 16:34:10 GMT
Author: pmcmahan
Date: Wed Oct 10 09:34:01 2007
New Revision: 583532

URL: http://svn.apache.org/viewvc?rev=583532&view=rev
Log:
log an exception instead of bailing out when geronimo's special
classloader for windows can't cache a jar file embedded in a car.

reenable plugins subproject now that it builds ok on windows.

Modified:
    geronimo/server/trunk/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/classloader/UrlResourceFinder.java
    geronimo/server/trunk/pom.xml

Modified: geronimo/server/trunk/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/classloader/UrlResourceFinder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/classloader/UrlResourceFinder.java?rev=583532&r1=583531&r2=583532&view=diff
==============================================================================
--- geronimo/server/trunk/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/classloader/UrlResourceFinder.java
(original)
+++ geronimo/server/trunk/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/classloader/UrlResourceFinder.java
Wed Oct 10 09:34:01 2007
@@ -34,12 +34,16 @@
 import java.util.jar.Attributes;
 import java.util.jar.Manifest;
 
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
 /**
  * @version $Rev$ $Date$
  */
 public class UrlResourceFinder implements ResourceFinder {
     private final Object lock = new Object();
 
+    private static final Log log = LogFactory.getLog(UrlResourceFinder.class);
     private final LinkedHashSet<URL> urls = new LinkedHashSet<URL>();
     private final LinkedHashMap<URL,ResourceLocation> classPath = new LinkedHashMap<URL,ResourceLocation>();
     private final LinkedHashSet<File> watchedFiles = new LinkedHashSet<File>();
@@ -196,6 +200,11 @@
                         // so don't keep a watch out for it because that would require lots
of checking
                         // Dain: We may want to review this decision later
                         continue;
+                    } catch (UnsupportedOperationException ex) {
+                        // the protocol for the JAR file's URL is not supported.  This can
occur when
+                        // the jar file is embedded in an EAR or CAR file.  Proceed but log
the message.
+                        log.error(ex);
+                        continue;
                     }
                 }
 
@@ -219,7 +228,7 @@
     protected File cacheUrl(URL url) throws IOException {
         if (!"file".equals(url.getProtocol())) {
             // download the jar
-            throw new Error("Only local file jars are supported " + url);
+            throw new UnsupportedOperationException("Only local file jars are supported "
+ url);
         }
 
         File file = new File(url.getPath());

Modified: geronimo/server/trunk/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/pom.xml?rev=583532&r1=583531&r2=583532&view=diff
==============================================================================
--- geronimo/server/trunk/pom.xml (original)
+++ geronimo/server/trunk/pom.xml Wed Oct 10 09:34:01 2007
@@ -2027,7 +2027,7 @@
                 <module>maven-plugins</module>
                 <module>applications</module>
                 <module>configs</module>
-                <!-- <module>plugins</module> -->
+                <module>plugins</module>
                 <module>assemblies</module>
             </modules>
         </profile>
@@ -2103,7 +2103,7 @@
             <modules>
                 <module>applications</module>
                 <module>configs</module>
-                <!-- <module>plugins</module> -->
+                <module>plugins</module>
                 <module>assemblies</module>
             </modules>
         </profile>
@@ -2126,7 +2126,7 @@
                 <module>maven-plugins</module>
                 <module>applications</module>
                 <module>configs</module>
-                <!-- <module>plugins</module> -->
+                <module>plugins</module>
             </modules>
         </profile>
 



Mime
View raw message