geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From genspr...@apache.org
Subject svn commit: r1130423 - in /geronimo/server/trunk/plugins: client/geronimo-client-builder/src/main/java/org/apache/geronimo/client/builder/ j2ee/geronimo-j2ee-builder/src/main/java/org/apache/geronimo/j2ee/deployment/
Date Thu, 02 Jun 2011 07:26:36 GMT
Author: genspring
Date: Thu Jun  2 07:26:36 2011
New Revision: 1130423

URL: http://svn.apache.org/viewvc?rev=1130423&view=rev
Log:
1, Copy the non module files before caculating manefest classpath because we need to support
direcory classpath.

2, Add manifest classpath caculation logic for lib/*.jar .

Modified:
    geronimo/server/trunk/plugins/client/geronimo-client-builder/src/main/java/org/apache/geronimo/client/builder/AppClientModuleBuilder.java
    geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/main/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder.java

Modified: geronimo/server/trunk/plugins/client/geronimo-client-builder/src/main/java/org/apache/geronimo/client/builder/AppClientModuleBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/client/geronimo-client-builder/src/main/java/org/apache/geronimo/client/builder/AppClientModuleBuilder.java?rev=1130423&r1=1130422&r2=1130423&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/client/geronimo-client-builder/src/main/java/org/apache/geronimo/client/builder/AppClientModuleBuilder.java
(original)
+++ geronimo/server/trunk/plugins/client/geronimo-client-builder/src/main/java/org/apache/geronimo/client/builder/AppClientModuleBuilder.java
Thu Jun  2 07:26:36 2011
@@ -571,12 +571,14 @@ public class AppClientModuleBuilder impl
                 
                 Collection<String> libClasspath = module.getParentModule().getClassPath();
                 for (String libEntryPath : libClasspath) {
+                  if(libEntryPath.endsWith(".jar")){
                     try {
                         NestedJarFile library = new NestedJarFile(earFile, libEntryPath);
                         appClientDeploymentContext.addIncludeAsPackedJar(URI.create(libEntryPath),
library);
                     } catch (IOException e) {
                         throw new DeploymentException("Could not add to app client library
classpath: " + libEntryPath, e);
                     }
+                  }
                 }
                 module.getClassPath().addAll(libClasspath);
             

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/main/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/main/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder.java?rev=1130423&r1=1130422&r2=1130423&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/main/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder.java
(original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/main/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder.java
Thu Jun  2 07:26:36 2011
@@ -607,17 +607,31 @@ public class EARConfigBuilder implements
                             break;
                         }
                     }
+                    
+                    if (addEntry) {
+                        earContext.addFile(URI.create(entry.getName()), earFile, entry);
+                    }
+                }
+                
+                for (Enumeration<JarEntry> e = earFile.entries(); e.hasMoreElements();)
{
+                    ZipEntry entry = e.nextElement();
+                    String entryName = entry.getName();
                     //   EAR/lib/sub-dir/*.jar should not be added into lib classpath.
                     if (libDir != null && entry.getName().startsWith(libDir) &&
entry.getName().endsWith(".jar") && entry.getName().substring(libDir.length()+1).indexOf("/")
== -1) {
                         NestedJarFile library = new NestedJarFile(earFile, entry.getName());
                         earContext.addIncludeAsPackedJar(URI.create(entry.getName()), library);
                         libClasspath.add(entry.getName());
-                    } else if (addEntry) {
-                        earContext.addFile(URI.create(entry.getName()), earFile, entry);
-                    }
+                        earContext.addManifestClassPath(library, URI.create(libDir+"/"),
libClasspath);
+                    } 
                 }
+                
             }
-
+            
+            
+            for(String classpath:applicationInfo.getClassPath()){
+                earContext.addToClassPath(classpath);
+            }
+            
             GerApplicationType geronimoApplication = (GerApplicationType) applicationInfo.getVendorDD();
 
             // each module installs it's files into the output context.. this is different
for each module type



Mime
View raw message