geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r420979 - in /geronimo/branches/1.1/modules: connector-builder/src/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java web-builder/src/java/org/apache/geronimo/web/deployment/AbstractWebModuleBuilder.java
Date Tue, 11 Jul 2006 20:24:25 GMT
Author: djencks
Date: Tue Jul 11 13:24:24 2006
New Revision: 420979

URL: http://svn.apache.org/viewvc?rev=420979&view=rev
Log:
GERONIMO-2125. Fix manifest classpath for war in ear

Modified:
    geronimo/branches/1.1/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java
    geronimo/branches/1.1/modules/web-builder/src/java/org/apache/geronimo/web/deployment/AbstractWebModuleBuilder.java

Modified: geronimo/branches/1.1/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/branches/1.1/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java?rev=420979&r1=420978&r2=420979&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java
(original)
+++ geronimo/branches/1.1/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java
Tue Jul 11 13:24:24 2006
@@ -261,6 +261,9 @@
             // add the manifest classpath entries declared in the connector to the class
loader
             // we have to explicitly add these since we are unpacking the connector module
             // and the url class loader will not pick up a manifiest from an unpacked dir
+            // N.B. If we ever introduce a separate configuration/module for a rar inside
an ear
+            // this will need to be modified to use "../" instead of module.getTargetPath().
+            // See AbstractWebModuleBuilder.
             earContext.addManifestClassPath(moduleFile, URI.create(module.getTargetPath()));
 
             URI targetURI = URI.create(module.getTargetPath() + "/");

Modified: geronimo/branches/1.1/modules/web-builder/src/java/org/apache/geronimo/web/deployment/AbstractWebModuleBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/branches/1.1/modules/web-builder/src/java/org/apache/geronimo/web/deployment/AbstractWebModuleBuilder.java?rev=420979&r1=420978&r2=420979&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/web-builder/src/java/org/apache/geronimo/web/deployment/AbstractWebModuleBuilder.java
(original)
+++ geronimo/branches/1.1/modules/web-builder/src/java/org/apache/geronimo/web/deployment/AbstractWebModuleBuilder.java
Tue Jul 11 13:24:24 2006
@@ -86,6 +86,13 @@
     protected static final AbstractNameQuery ENTITY_BEAN_PATTERN;
     protected final Kernel kernel;
 
+    /**
+     * Manifest classpath entries in a war configuration must be resolved relative to the
war configuration, not the
+     * enclosing ear configuration.  Resolving relative to he war configuration using this
offset produces the same
+     * effect as URI.create(module.targetPath()).resolve(mcpEntry) executed in the ear configuration.
+     */
+    private static final URI RELATIVE_MODULE_BASE_URI = URI.create("../");
+
     protected AbstractWebModuleBuilder(Kernel kernel) {
         this.kernel = kernel;
     }
@@ -226,7 +233,7 @@
             // add the manifest classpath entries declared in the war to the class loader
             // we have to explicitly add these since we are unpacking the web module
             // and the url class loader will not pick up a manifest from an unpacked dir
-            moduleContext.addManifestClassPath(warFile, URI.create(module.getTargetPath()));
+            moduleContext.addManifestClassPath(warFile, RELATIVE_MODULE_BASE_URI);
 
         } catch (IOException e) {
             throw new DeploymentException("Problem deploying war", e);



Mime
View raw message