Return-Path: Delivered-To: apmail-geronimo-scm-archive@www.apache.org Received: (qmail 23229 invoked from network); 25 Aug 2006 14:27:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 25 Aug 2006 14:27:03 -0000 Received: (qmail 19361 invoked by uid 500); 25 Aug 2006 14:27:03 -0000 Delivered-To: apmail-geronimo-scm-archive@geronimo.apache.org Received: (qmail 19324 invoked by uid 500); 25 Aug 2006 14:27:03 -0000 Mailing-List: contact scm-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list scm@geronimo.apache.org Received: (qmail 19313 invoked by uid 99); 25 Aug 2006 14:27:03 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Aug 2006 07:27:03 -0700 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [140.211.166.113] (HELO eris.apache.org) (140.211.166.113) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Aug 2006 07:27:02 -0700 Received: by eris.apache.org (Postfix, from userid 65534) id 5CE1D1A981D; Fri, 25 Aug 2006 07:26:42 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r436812 - in /geronimo/server/branches/sachin/modules: axis-builder/src/test/java/org/apache/geronimo/axis/builder/ jetty-builder/src/main/java/org/apache/geronimo/jetty/deployment/ kernel/src/main/java/org/apache/geronimo/kernel/config/ we... Date: Fri, 25 Aug 2006 14:26:40 -0000 To: scm@geronimo.apache.org From: sppatel@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20060825142642.5CE1D1A981D@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: sppatel Date: Fri Aug 25 07:26:39 2006 New Revision: 436812 URL: http://svn.apache.org/viewvc?rev=436812&view=rev Log: more stuff that faild to merge Modified: geronimo/server/branches/sachin/modules/axis-builder/src/test/java/org/apache/geronimo/axis/builder/ServiceReferenceTest.java geronimo/server/branches/sachin/modules/jetty-builder/src/main/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java geronimo/server/branches/sachin/modules/kernel/src/main/java/org/apache/geronimo/kernel/config/Configuration.java geronimo/server/branches/sachin/modules/web-builder/src/main/java/org/apache/geronimo/web/deployment/AbstractWebModuleBuilder.java Modified: geronimo/server/branches/sachin/modules/axis-builder/src/test/java/org/apache/geronimo/axis/builder/ServiceReferenceTest.java URL: http://svn.apache.org/viewvc/geronimo/server/branches/sachin/modules/axis-builder/src/test/java/org/apache/geronimo/axis/builder/ServiceReferenceTest.java?rev=436812&r1=436811&r2=436812&view=diff ============================================================================== --- geronimo/server/branches/sachin/modules/axis-builder/src/test/java/org/apache/geronimo/axis/builder/ServiceReferenceTest.java (original) +++ geronimo/server/branches/sachin/modules/axis-builder/src/test/java/org/apache/geronimo/axis/builder/ServiceReferenceTest.java Fri Aug 25 07:26:39 2006 @@ -24,6 +24,7 @@ import java.util.Collections; import java.util.List; import java.util.Map; +import java.util.jar.JarFile; import javax.wsdl.Binding; import javax.wsdl.BindingInput; import javax.wsdl.BindingOperation; @@ -61,6 +62,8 @@ import org.apache.geronimo.axis.client.AxisServiceReference; import org.apache.geronimo.common.DeploymentException; import org.apache.geronimo.deployment.DeploymentContext; +import org.apache.geronimo.deployment.DeployableModule; +import org.apache.geronimo.deployment.DeployableModuleFactory; import org.apache.geronimo.deployment.util.UnpackedJarFile; import org.apache.geronimo.gbean.AbstractName; import org.apache.geronimo.j2ee.deployment.EJBModule; @@ -118,7 +121,9 @@ File moduleLocation = new File(tmpbasedir, "ejb"); moduleLocation.mkdirs(); - module = new EJBModule(true, moduleName, environment, new UnpackedJarFile(moduleLocation), "ejb", null, null, null); + JarFile unpackedJar = new UnpackedJarFile(moduleLocation); + DeployableModule dm = DeployableModuleFactory.createDeployableModule(unpackedJar); + module = new EJBModule(true, moduleName, environment, dm, "ejb", null, null, null); runExternalWSTest = System.getProperty("geronimo.run.external.webservicetest", "false").equals("true"); } Modified: geronimo/server/branches/sachin/modules/jetty-builder/src/main/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java URL: http://svn.apache.org/viewvc/geronimo/server/branches/sachin/modules/jetty-builder/src/main/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java?rev=436812&r1=436811&r2=436812&view=diff ============================================================================== --- geronimo/server/branches/sachin/modules/jetty-builder/src/main/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java (original) +++ geronimo/server/branches/sachin/modules/jetty-builder/src/main/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java Fri Aug 25 07:26:39 2006 @@ -261,11 +261,11 @@ if (plan != null) { rawPlan = XmlBeansUtil.parse(((File) plan).toURL(), getClass().getClassLoader()); } else { - URL path = DeploymentUtil.createJarURL(deployableModule, "WEB-INF/geronimo-web.xml"); + URL path = deployableModule.resolve("WEB-INF/geronimo-web.xml"); try { rawPlan = XmlBeansUtil.parse(path, getClass().getClassLoader()); } catch (FileNotFoundException e) { - path = DeploymentUtil.createJarURL(deployableModule, "WEB-INF/geronimo-jetty.xml"); + path = deployableModule.resolve("WEB-INF/geronimo-jetty.xml"); try { rawPlan = XmlBeansUtil.parse(path, getClass().getClassLoader()); } catch (FileNotFoundException e1) { Modified: geronimo/server/branches/sachin/modules/kernel/src/main/java/org/apache/geronimo/kernel/config/Configuration.java URL: http://svn.apache.org/viewvc/geronimo/server/branches/sachin/modules/kernel/src/main/java/org/apache/geronimo/kernel/config/Configuration.java?rev=436812&r1=436811&r2=436812&view=diff ============================================================================== --- geronimo/server/branches/sachin/modules/kernel/src/main/java/org/apache/geronimo/kernel/config/Configuration.java (original) +++ geronimo/server/branches/sachin/modules/kernel/src/main/java/org/apache/geronimo/kernel/config/Configuration.java Fri Aug 25 07:26:39 2006 @@ -505,6 +505,10 @@ } } + public void addToClassPath(URL url) throws IOException { + configurationClassLoader.addURL(url); + } + /** * Gets the type of the configuration (WAR, RAR et cetera) * @return Type of the configuration. Modified: geronimo/server/branches/sachin/modules/web-builder/src/main/java/org/apache/geronimo/web/deployment/AbstractWebModuleBuilder.java URL: http://svn.apache.org/viewvc/geronimo/server/branches/sachin/modules/web-builder/src/main/java/org/apache/geronimo/web/deployment/AbstractWebModuleBuilder.java?rev=436812&r1=436811&r2=436812&view=diff ============================================================================== --- geronimo/server/branches/sachin/modules/web-builder/src/main/java/org/apache/geronimo/web/deployment/AbstractWebModuleBuilder.java (original) +++ geronimo/server/branches/sachin/modules/web-builder/src/main/java/org/apache/geronimo/web/deployment/AbstractWebModuleBuilder.java Fri Aug 25 07:26:39 2006 @@ -48,6 +48,7 @@ import org.apache.geronimo.deployment.ModuleIDBuilder; import org.apache.geronimo.deployment.NamespaceDrivenBuilderCollection; import org.apache.geronimo.deployment.DeployableModule; +import org.apache.geronimo.deployment.DefaultDeployableModule; import org.apache.geronimo.deployment.xmlbeans.XmlBeansUtil; import org.apache.geronimo.deployment.xbeans.ServiceDocument; import org.apache.geronimo.gbean.AbstractName; @@ -226,29 +227,38 @@ try { // add the warfile's content to the configuration - JarFile warFile = module.getModuleFile(); - Enumeration entries = warFile.entries(); - while (entries.hasMoreElements()) { - ZipEntry entry = (ZipEntry) entries.nextElement(); - URI targetPath = new URI(null, entry.getName(), null); - if (entry.getName().equals("WEB-INF/web.xml")) { - moduleContext.addFile(targetPath, module.getOriginalSpecDD()); - } else if (entry.getName().startsWith("WEB-INF/lib") && entry.getName().endsWith(".jar")) { - moduleContext.addInclude(targetPath, warFile, entry); - } else { - moduleContext.addFile(targetPath, warFile, entry); + DeployableModule war = module.getModuleFile(); + if (war instanceof DefaultDeployableModule) { + JarFile jar = ((DefaultDeployableModule) war).getJarFile(); + + Enumeration entries = jar.entries(); + while (entries.hasMoreElements()) { + ZipEntry entry = (ZipEntry) entries.nextElement(); + URI targetPath = new URI(null, entry.getName(), null); + if (entry.getName().equals("WEB-INF/web.xml")) { + moduleContext.addFile(targetPath, module.getOriginalSpecDD()); + } else if (entry.getName().startsWith("WEB-INF/lib") && entry.getName().endsWith(".jar")) { + moduleContext.addInclude(targetPath, jar, entry); + } else { + moduleContext.addFile(targetPath, jar, entry); + } } - } - - //always add WEB-INF/classes to the classpath regardless of whether - //any classes exist - moduleContext.getConfiguration().addToClassPath("WEB-INF/classes/"); - - // 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, RELATIVE_MODULE_BASE_URI); + //always add WEB-INF/classes to the classpath regardless of whether + //any classes exist + moduleContext.getConfiguration().addToClassPath("WEB-INF/classes/"); + + // 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(jar, RELATIVE_MODULE_BASE_URI); + } else { + //TODO GERONIMO-1526 + File[] classes = war.getClassesFolders(); + for (int i = 0; i < classes.length; i++) { + moduleContext.getConfiguration().addToClassPath(classes[i].toURL()); + } + } } catch (IOException e) { throw new DeploymentException("Problem deploying war", e); } catch (URISyntaxException e) {