cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r377999 - /cocoon/branches/BRANCH_2_1_X/tools/src/loader/Loader.java
Date Wed, 15 Feb 2006 12:49:28 GMT
Author: jbq
Date: Wed Feb 15 04:49:26 2006
New Revision: 377999

URL: http://svn.apache.org/viewcvs?rev=377999&view=rev
Log:
Load classpath entries before jar repositories to allow WEB-INF/classes overriding WEB-INF/lib

Reported by Guillaume Déflache <guillaume@anyware-tech.com>

Modified:
    cocoon/branches/BRANCH_2_1_X/tools/src/loader/Loader.java

Modified: cocoon/branches/BRANCH_2_1_X/tools/src/loader/Loader.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/tools/src/loader/Loader.java?rev=377999&r1=377998&r2=377999&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/tools/src/loader/Loader.java (original)
+++ cocoon/branches/BRANCH_2_1_X/tools/src/loader/Loader.java Wed Feb 15 04:49:26 2006
@@ -95,17 +95,20 @@
         if (verbose) System.out.println("-------------------- Loading --------------------");
 
         RepositoryClassLoader classLoader = new RepositoryClassLoader(this.getClass().getClassLoader());
-
-        StringTokenizer st = new StringTokenizer(repositories, File.pathSeparator);
-        while (st.hasMoreTokens()) {
-            classLoader.addRepository(new File(st.nextToken()));        
-        }
+        StringTokenizer st;
 
         if (classPath != null) {
+            // Load classpath entries before jar repositories to allow
+            // WEB-INF/classes overriding WEB-INF/lib
             st = new StringTokenizer(classPath, File.pathSeparator);
             while (st.hasMoreTokens()) {
                 classLoader.addFile(new File(st.nextToken()));
             }
+        }
+
+        st = new StringTokenizer(repositories, File.pathSeparator);
+        while (st.hasMoreTokens()) {
+            classLoader.addRepository(new File(st.nextToken()));        
         }
 
         Thread.currentThread().setContextClassLoader(classLoader);



Mime
View raw message