geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xuhaih...@apache.org
Subject svn commit: r896339 [3/4] - in /geronimo/server/trunk: framework/modules/geronimo-common/src/main/java/org/apache/geronimo/common/ framework/modules/geronimo-deploy-tool/src/main/java/org/apache/geronimo/deployment/cli/ framework/modules/geronimo-deplo...
Date Wed, 06 Jan 2010 07:30:40 GMT
Modified: geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-builder-1_6/src/test/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilderTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-builder-1_6/src/test/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilderTest.java?rev=896339&r1=896338&r2=896339&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-builder-1_6/src/test/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilderTest.java (original)
+++ geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-builder-1_6/src/test/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilderTest.java Wed Jan  6 07:29:20 2010
@@ -23,20 +23,20 @@
 import java.sql.Connection;
 import java.sql.Statement;
 import java.util.Collections;
+import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
-import java.util.HashMap;
 import java.util.jar.JarFile;
 
 import javax.naming.Reference;
 import javax.sql.DataSource;
+
 import org.apache.geronimo.common.DeploymentException;
 import org.apache.geronimo.deployment.DeploymentContext;
 import org.apache.geronimo.deployment.ModuleIDBuilder;
 import org.apache.geronimo.deployment.NamespaceDrivenBuilder;
 import org.apache.geronimo.deployment.service.GBeanBuilder;
-import org.apache.geronimo.deployment.util.DeploymentUtil;
 import org.apache.geronimo.gbean.AbstractName;
 import org.apache.geronimo.gbean.AbstractNameQuery;
 import org.apache.geronimo.gbean.GBeanData;
@@ -57,7 +57,6 @@
 import org.apache.geronimo.kernel.config.ConfigurationManager;
 import org.apache.geronimo.kernel.config.ConfigurationStore;
 import org.apache.geronimo.kernel.config.ConfigurationUtil;
-import org.apache.geronimo.kernel.config.EditableKernelConfigurationManager;
 import org.apache.geronimo.kernel.config.KernelConfigurationManager;
 import org.apache.geronimo.kernel.management.State;
 import org.apache.geronimo.kernel.mock.MockConfigStore;
@@ -70,6 +69,8 @@
 import org.apache.geronimo.kernel.repository.DefaultArtifactResolver;
 import org.apache.geronimo.kernel.repository.Environment;
 import org.apache.geronimo.kernel.repository.ImportType;
+import org.apache.geronimo.kernel.util.FileUtils;
+import org.apache.geronimo.kernel.util.JarUtils;
 import org.apache.geronimo.system.serverinfo.BasicServerInfo;
 import org.apache.geronimo.testsupport.TestSupport;
 import org.apache.geronimo.transaction.wrapper.manager.GeronimoTransactionManagerGBean;
@@ -79,7 +80,7 @@
  * @version $Rev:385232 $ $Date$
  */
 public class ConnectorModuleBuilderTest extends TestSupport {
-    
+
     private boolean defaultXATransactionCaching = true;
     private boolean defaultXAThreadCaching = false;
     private int defaultMaxSize = 10;
@@ -119,7 +120,7 @@
     public void testBuildEar() throws Exception {
         JarFile rarFile = null;
         try {
-            rarFile = DeploymentUtil.createJarFile(new File(BASEDIR, "target/test-ear-noger.ear"));
+            rarFile = JarUtils.createJarFile(new File(BASEDIR, "target/test-ear-noger.ear"));
             GBeanBuilder serviceBuilder = new GBeanBuilder(null, null);
 //            EARConfigBuilder configBuilder = new EARConfigBuilder(defaultEnvironment, transactionContextManagerName, connectionTrackerName, null, null, null, new AbstractNameQuery(serverName, J2EEServerImpl.GBEAN_INFO.getInterfaces()), null, null, ejbReferenceBuilder, null,
             EARConfigBuilder configBuilder = new EARConfigBuilder(defaultEnvironment,
@@ -158,12 +159,12 @@
                     context.close();
                 }
                 if (configData != null) {
-                    DeploymentUtil.recursiveDelete(configData.getConfigurationDir());
+                    FileUtils.recursiveDelete(configData.getConfigurationDir());
                 }
             }
             configBuilder.doStop();
         } finally {
-            DeploymentUtil.close(rarFile);
+            JarUtils.close(rarFile);
 
         }
     }
@@ -272,7 +273,7 @@
         };
         executeTestBuildModule(action, true);
     }
-    
+
     public void testBuildPackedModule15LocalTx() throws Exception {
         InstallAction action = new InstallAction() {
             private File rarFile = new File(BASEDIR, "target/test-rar-15-localtx.rar");
@@ -320,7 +321,7 @@
 
 //            Thread.currentThread().setContextClassLoader(cl);
 
-            JarFile rarJarFile = DeploymentUtil.createJarFile(rarFile);
+            JarFile rarJarFile = JarUtils.createJarFile(rarFile);
             AbstractName earName = null;
             String moduleName = "geronimo/test-ear/1.0/car";
             Module module = moduleBuilder.createModule(action.getVendorDD(), rarJarFile, moduleName, action.getSpecDD(), null, null, earName, naming, new ModuleIDBuilder());
@@ -331,7 +332,7 @@
 
             File tempDir = null;
             try {
-                tempDir = DeploymentUtil.createTempDir();
+                tempDir = FileUtils.createTempDir();
                 EARContext earContext = new EARContext(tempDir,
                         null,
                         module.getEnvironment(),
@@ -359,7 +360,7 @@
                 verifyDeployment(configurationData, oldCl, moduleAbstractName, resourceAdapterName, is15, moduleName);
             } finally {
                 module.close();
-                DeploymentUtil.recursiveDelete(tempDir);
+                FileUtils.recursiveDelete(tempDir);
             }
         } finally {
             kernel.shutdown();

Modified: geronimo/server/trunk/plugins/hotdeploy/geronimo-hot-deploy/src/main/java/org/apache/geronimo/deployment/hot/DirectoryHotDeployer.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/hotdeploy/geronimo-hot-deploy/src/main/java/org/apache/geronimo/deployment/hot/DirectoryHotDeployer.java?rev=896339&r1=896338&r2=896339&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/hotdeploy/geronimo-hot-deploy/src/main/java/org/apache/geronimo/deployment/hot/DirectoryHotDeployer.java (original)
+++ geronimo/server/trunk/plugins/hotdeploy/geronimo-hot-deploy/src/main/java/org/apache/geronimo/deployment/hot/DirectoryHotDeployer.java Wed Jan  6 07:29:20 2010
@@ -28,14 +28,10 @@
 import javax.enterprise.deploy.spi.factories.DeploymentFactory;
 import javax.enterprise.deploy.spi.status.ProgressObject;
 
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.apache.geronimo.common.DeploymentException;
-import org.apache.geronimo.common.FileUtils;
 import org.apache.geronimo.deployment.cli.DeployUtils;
 import org.apache.geronimo.deployment.plugin.factories.DeploymentFactoryWithKernel;
 import org.apache.geronimo.deployment.plugin.jmx.JMXDeploymentManager;
-import org.apache.geronimo.deployment.util.DeploymentUtil;
 import org.apache.geronimo.gbean.AbstractName;
 import org.apache.geronimo.gbean.AbstractNameQuery;
 import org.apache.geronimo.gbean.GBeanInfo;
@@ -48,7 +44,11 @@
 import org.apache.geronimo.kernel.config.PersistentConfigurationList;
 import org.apache.geronimo.kernel.repository.Artifact;
 import org.apache.geronimo.kernel.repository.MissingDependencyException;
+import org.apache.geronimo.kernel.util.FileUtils;
+import org.apache.geronimo.kernel.util.JarUtils;
 import org.apache.geronimo.system.serverinfo.ServerInfo;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * A directory-scanning hot deployer
@@ -272,7 +272,7 @@
 
             ProgressObject po;
 
-            if (FileUtils.isJarFile(file) || file.isDirectory()) {
+            if (JarUtils.isJarFile(file) || file.isDirectory()) {
                 po = mgr.distribute(targets, file, null);
             } else {
                 po = mgr.distribute(targets, null, file);
@@ -299,24 +299,24 @@
                     }
                 }
             } else {
-            	 //Try to delete the module , that failed to successfully hot-deploy  
+            	 //Try to delete the module , that failed to successfully hot-deploy
             	log.error("Unable to deploy: " + po.getDeploymentStatus().getMessage());
             	String delfile=file.getAbsolutePath();
                 File fd = new File(delfile);
                 if(fd.isDirectory()){
                	    log.info("Deleting the Directory: "+delfile);
-               	    if(DeploymentUtil.recursiveDelete(fd))
+               	    if(FileUtils.recursiveDelete(fd))
                		    log.debug("Successfully deleted the Directory: "+delfile);
                	    else
                		    log.error("Couldn't delete the hot deployed directory"+delfile);
                 }else if(fd.isFile()){
                	    log.info("Deleting the File: "+delfile);
                	    if(fd.delete()){
-               		log.debug("Successfully deleted the File: "+delfile); 
+               		log.debug("Successfully deleted the File: "+delfile);
                	}else
-               		log.error("Couldn't delete the hot deployed directory"+delfile); 
+               		log.error("Couldn't delete the hot deployed directory"+delfile);
                 }
-                            
+
                 return null;
             }
         } catch (DeploymentManagerCreationException e) {
@@ -338,7 +338,7 @@
             return null;
         }
     }
-    
+
     private DeploymentManager getDeploymentManager() throws DeploymentManagerCreationException {
         DeploymentManager manager = factory.getDeploymentManager(deploymentURI, deploymentUser, deploymentPassword);
         if (manager instanceof JMXDeploymentManager) {
@@ -393,7 +393,7 @@
                     continue;
                 }
                 if(parts[1] != null && parts[1].equals(config))
-                    return ids[j].getModuleID();                
+                    return ids[j].getModuleID();
             }
         } catch(Exception ex){
             log.error("Unable to getModuleId",ex);
@@ -411,7 +411,7 @@
             TargetModuleID[] ids = mgr.getAvailableModules(null, targets);
             ids = (TargetModuleID[]) DeployUtils.identifyTargetModuleIDs(ids, configId, true).toArray(new TargetModuleID[0]);
             ProgressObject po;
-            if (FileUtils.isJarFile(file) || file.isDirectory()) {
+            if (JarUtils.isJarFile(file) || file.isDirectory()) {
                 po = mgr.redeploy(ids, file, null);
             } else {
                 po = mgr.redeploy(ids, null, file);

Modified: geronimo/server/trunk/plugins/hotdeploy/geronimo-hot-deploy/src/main/java/org/apache/geronimo/deployment/hot/DirectoryMonitor.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/hotdeploy/geronimo-hot-deploy/src/main/java/org/apache/geronimo/deployment/hot/DirectoryMonitor.java?rev=896339&r1=896338&r2=896339&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/hotdeploy/geronimo-hot-deploy/src/main/java/org/apache/geronimo/deployment/hot/DirectoryMonitor.java (original)
+++ geronimo/server/trunk/plugins/hotdeploy/geronimo-hot-deploy/src/main/java/org/apache/geronimo/deployment/hot/DirectoryMonitor.java Wed Jan  6 07:29:20 2010
@@ -16,24 +16,23 @@
  */
 package org.apache.geronimo.deployment.hot;
 
-import org.slf4j.LoggerFactory;
-import org.slf4j.Logger;
-import org.apache.geronimo.deployment.cli.DeployUtils;
-import org.apache.geronimo.deployment.util.DeploymentUtil;
-import org.apache.geronimo.kernel.repository.Artifact;
-import org.apache.geronimo.kernel.util.IOUtils;
-
 import java.io.File;
-import java.io.Serializable;
 import java.io.IOException;
-import java.util.Map;
+import java.io.Serializable;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Iterator;
-import java.util.List;
 import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
 import java.util.Set;
 
+import org.apache.geronimo.deployment.cli.DeployUtils;
+import org.apache.geronimo.kernel.repository.Artifact;
+import org.apache.geronimo.kernel.util.FileUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 /**
  * Meant to be run as a Thread that tracks the contents of a directory.
  * It sends notifications for changes to its immediate children (it
@@ -56,7 +55,7 @@
         boolean isServerRunning();
 
         /**
-         * Checks if the file with same configID is already deployed 
+         * Checks if the file with same configID is already deployed
          *
          * @return true if the file in question is already available in the
          *         server, false if it should be deployed on the next pass.
@@ -184,7 +183,7 @@
                     File file = new File(path);
                     if(file.exists()) { // if not, probably it's deletion kicked off this whole process
                         log.info("Hot deployer deleting "+id);
-                        if(!IOUtils.recursiveDelete(file)) {
+                        if(!FileUtils.recursiveDelete(file)) {
                             log.error("Hot deployer unable to delete "+path);
                         }
                         it.remove();
@@ -347,7 +346,7 @@
                                         File fd = new File(path);
                                         if (fd.isDirectory()) {
                                             log.info("Deleting the Directory: "+path);
-                                            if (DeploymentUtil.recursiveDelete(fd))
+                                            if (FileUtils.recursiveDelete(fd))
                                                 log.debug("Successfully deleted the Directory: "+path);
                                             else
                                                 log.error("Couldn't delete the hot deployed directory="+path);
@@ -355,10 +354,10 @@
                                         else if (fd.isFile()) {
                                             log.info("Deleting the File: "+path);
                                             if (fd.delete()) {
-                                                log.debug("Successfully deleted the File: "+path); 
+                                                log.debug("Successfully deleted the File: "+path);
                                             }
                                             else
-                                                log.error("Couldn't delete the hot deployed file="+path); 
+                                                log.error("Couldn't delete the hot deployed file="+path);
                                         }
                                         files.remove(path);
                                     }

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=896339&r1=896338&r2=896339&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 Wed Jan  6 07:29:20 2010
@@ -32,7 +32,6 @@
 import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
-import java.util.Set;
 import java.util.jar.Attributes;
 import java.util.jar.JarEntry;
 import java.util.jar.JarFile;
@@ -40,6 +39,7 @@
 import java.util.zip.ZipEntry;
 
 import javax.xml.namespace.QName;
+
 import org.apache.geronimo.common.DeploymentException;
 import org.apache.geronimo.deployment.ClassPathList;
 import org.apache.geronimo.deployment.ConfigurationBuilder;
@@ -49,8 +49,6 @@
 import org.apache.geronimo.deployment.NamespaceDrivenBuilder;
 import org.apache.geronimo.deployment.NamespaceDrivenBuilderCollection;
 import org.apache.geronimo.deployment.service.EnvironmentBuilder;
-import org.apache.geronimo.deployment.util.DeploymentUtil;
-import org.apache.geronimo.deployment.util.NestedJarFile;
 import org.apache.geronimo.deployment.xbeans.ArtifactType;
 import org.apache.geronimo.deployment.xbeans.EnvironmentType;
 import org.apache.geronimo.deployment.xbeans.PatternType;
@@ -66,7 +64,6 @@
 import org.apache.geronimo.gbean.annotation.ParamReference;
 import org.apache.geronimo.gbean.annotation.ParamSpecial;
 import org.apache.geronimo.gbean.annotation.SpecialAttributeType;
-import org.apache.geronimo.j2ee.deployment.ApplicationInfo;
 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
 import org.apache.geronimo.j2ee.management.impl.J2EEApplicationImpl;
 import org.apache.geronimo.kernel.GBeanAlreadyExistsException;
@@ -85,6 +82,9 @@
 import org.apache.geronimo.kernel.repository.Environment;
 import org.apache.geronimo.kernel.repository.MissingDependencyException;
 import org.apache.geronimo.kernel.repository.Repository;
+import org.apache.geronimo.kernel.util.FileUtils;
+import org.apache.geronimo.kernel.util.JarUtils;
+import org.apache.geronimo.kernel.util.NestedJarFile;
 import org.apache.geronimo.management.J2EEResource;
 import org.apache.geronimo.management.J2EEServer;
 import org.apache.geronimo.schema.SchemaConversionUtils;
@@ -383,8 +383,8 @@
         ApplicationType application = null;
         if (earFile != null) {
             try {
-                URL applicationXmlUrl = DeploymentUtil.createJarURL(earFile, "META-INF/application.xml");
-                specDD = DeploymentUtil.readAll(applicationXmlUrl);
+                URL applicationXmlUrl = JarUtils.createJarURL(earFile, "META-INF/application.xml");
+                specDD = JarUtils.readAll(applicationXmlUrl);
                 //we found something called application.xml in the right place, if we can't parse it it's an error
                 XmlObject xmlObject = XmlBeansUtil.parse(specDD);
                 application = convertToApplicationSchema(xmlObject).getApplication();
@@ -411,7 +411,7 @@
                         return null;
                     }
                 } else {
-                    URL path = DeploymentUtil.createJarURL(earFile, "META-INF/geronimo-application.xml");
+                    URL path = JarUtils.createJarURL(earFile, "META-INF/geronimo-application.xml");
                     rawPlan = XmlBeansUtil.parse(path, getClass().getClassLoader());
                     gerApplication = (GerApplicationType) SchemaConversionUtils.fixGeronimoSchema(rawPlan, APPLICATION_QNAME, GerApplicationType.type);
                 }
@@ -572,7 +572,7 @@
 
             // Create the output ear context
             earContext = new EARContext(configurationDir,
-                    inPlaceDeployment ? DeploymentUtil.toFile(earFile) : null,
+                    inPlaceDeployment ? JarUtils.toFile(earFile) : null,
                     applicationInfo.getEnvironment(),
                     applicationType,
                     naming,
@@ -590,19 +590,18 @@
             earContext.getGeneralData().put(ModuleList.class, applicationInfo.getModuleLocations());
 
             // Copy over all files that are _NOT_ modules (e.g. META-INF and APP-INF files)
-            Set moduleLocations = applicationInfo.getModuleLocations();
-            ClassPathList libClasspath = new ClassPathList();
+            ModuleList moduleLocations = applicationInfo.getModuleLocations();
             if (ConfigurationModuleType.EAR == applicationType && earFile != null) {
                 //get the value of the library-directory element in spec DD
                 ApplicationType specDD = (ApplicationType) applicationInfo.getSpecDD();
                 String libDir = getLibraryDirectory(specDD);
+                ClassPathList libClasspath = new ClassPathList();
                 for (Enumeration<JarEntry> e = earFile.entries(); e.hasMoreElements();) {
                     ZipEntry entry = e.nextElement();
                     String entryName = entry.getName();
                     boolean addEntry = true;
-                    for (Object moduleLocation : moduleLocations) {
-                        String location = (String) moduleLocation;
-                        if (entryName.startsWith(location)) {
+                    for (String moduleLocation : moduleLocations) {
+                        if (entryName.startsWith(moduleLocation)) {
                             addEntry = false;
                             break;
                         }
@@ -615,9 +614,7 @@
                         earContext.addFile(URI.create(entry.getName()), earFile, entry);
                     }
                 }
-                if (!libClasspath.isEmpty()) {
-                    earContext.getGeneralData().put(ClassPathList.class, libClasspath);
-                }
+                earContext.getGeneralData().put(ClassPathList.class, libClasspath);
             }
 
             GerApplicationType geronimoApplication = (GerApplicationType) applicationInfo.getVendorDD();
@@ -629,6 +626,7 @@
 
             earContext.flush();
             earContext.initializeConfiguration();
+
             for (Module module : applicationInfo.getModules()) {
                 if (earContext != module.getEarContext()) {
                     module.getEarContext().initializeConfiguration();
@@ -643,7 +641,7 @@
                         getBuilder(module).initContext(earContext, module, bundle);
                     } catch (Exception e) {
                         // ignore any exceptions to continue processing with the rest of the modules;
-                        System.out.println("Exception during initContext() phase");
+                        log.warn("Exception during initContext() phase");
                     }
                 } else {
                     getBuilder(module).initContext(earContext, module, bundle);
@@ -657,7 +655,6 @@
 
             if (ConfigurationModuleType.EAR == applicationType) {
                 // process persistence unit in EAR library directory
-                earContext.getGeneralData().put(ClassPathList.class, libClasspath);
                 for (ModuleBuilderExtension mbe : persistenceUnitBuilders) {
                     mbe.initContext(earContext, applicationInfo, earContext.getDeploymentBundle());
                 }
@@ -702,7 +699,7 @@
                         getBuilder(module).addGBeans(earContext, module, bundle, repositories);
                     } catch (DeploymentException e) {
                         // ignore any exceptions to continue processing with the rest of the modules;
-                        System.out.println("Exception during addGBeans() phase");
+                        log.warn("Exception during addGBeans() phase", e);
                     }
                 } else {
                     getBuilder(module).addGBeans(earContext, module, bundle, repositories);
@@ -775,7 +772,7 @@
     private boolean cleanupConfigurationDir(File configurationDir) {
         LinkedList<String> cannotBeDeletedList = new LinkedList<String>();
 
-        if (!DeploymentUtil.recursiveDelete(configurationDir, cannotBeDeletedList)) {
+        if (!FileUtils.recursiveDelete(configurationDir, cannotBeDeletedList)) {
             // Output a message to help user track down file problem
             log.warn("Unable to delete " + cannotBeDeletedList.size() +
                     " files while recursively deleting directory "
@@ -1110,7 +1107,7 @@
             if (gerModule.isSetAltDd()) {
                 // the the url of the alt dd
                 try {
-                    altVendorDDs.put(path, DeploymentUtil.toTempFile(earFile, gerModule.getAltDd().getStringValue()));
+                    altVendorDDs.put(path, JarUtils.toTempFile(earFile, gerModule.getAltDd().getStringValue()));
                 } catch (IOException e) {
                     throw new DeploymentException("Invalid alt vendor dd url: " + gerModule.getAltDd().getStringValue(), e);
                 }
@@ -1128,7 +1125,7 @@
     private URL getAltSpecDDURL(JarFile earFile, ModuleType moduleXml) throws DeploymentException {
         if (moduleXml != null && moduleXml.isSetAltDd()) {
             try {
-                return DeploymentUtil.createJarURL(earFile, moduleXml.getAltDd().getStringValue());
+                return JarUtils.createJarURL(earFile, moduleXml.getAltDd().getStringValue());
             } catch (MalformedURLException e) {
                 throw new DeploymentException("Invalid alt sped dd url: " + moduleXml.getAltDd().getStringValue(), e);
             }

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/main/java/org/apache/geronimo/j2ee/deployment/EARContext.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/main/java/org/apache/geronimo/j2ee/deployment/EARContext.java?rev=896339&r1=896338&r2=896339&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/main/java/org/apache/geronimo/j2ee/deployment/EARContext.java (original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/main/java/org/apache/geronimo/j2ee/deployment/EARContext.java Wed Jan  6 07:29:20 2010
@@ -40,7 +40,7 @@
     private final AbstractNameQuery connectionTrackerObjectName;
     private final AbstractNameQuery corbaGBeanObjectName;
 
-    private final Map contextIDToPermissionsMap = new HashMap();
+    private final Map<String, Object> contextIDToPermissionsMap = new HashMap<String, Object>();
     private Object securityConfiguration;
     private boolean hasSecurity;
 

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/main/java/org/apache/geronimo/j2ee/deployment/Module.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/main/java/org/apache/geronimo/j2ee/deployment/Module.java?rev=896339&r1=896338&r2=896339&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/main/java/org/apache/geronimo/j2ee/deployment/Module.java (original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/main/java/org/apache/geronimo/j2ee/deployment/Module.java Wed Jan  6 07:29:20 2010
@@ -16,21 +16,21 @@
  */
 package org.apache.geronimo.j2ee.deployment;
 
-import java.util.jar.JarFile;
-import java.util.Map;
-import java.util.HashMap;
 import java.net.URI;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.jar.JarFile;
 
-import org.apache.xmlbeans.XmlObject;
-import org.apache.geronimo.kernel.config.ConfigurationModuleType;
-import org.apache.geronimo.kernel.config.ConfigurationData;
-import org.apache.geronimo.kernel.repository.Environment;
-import org.apache.geronimo.kernel.repository.Artifact;
-import org.apache.geronimo.deployment.util.DeploymentUtil;
+import org.apache.geronimo.common.DeploymentException;
 import org.apache.geronimo.gbean.AbstractName;
 import org.apache.geronimo.j2ee.deployment.annotation.AnnotatedApp;
-import org.apache.geronimo.common.DeploymentException;
+import org.apache.geronimo.kernel.config.ConfigurationData;
+import org.apache.geronimo.kernel.config.ConfigurationModuleType;
+import org.apache.geronimo.kernel.repository.Artifact;
+import org.apache.geronimo.kernel.repository.Environment;
+import org.apache.geronimo.kernel.util.JarUtils;
 import org.apache.xbean.finder.ClassFinder;
+import org.apache.xmlbeans.XmlObject;
 
 /**
  * @version $Rev$ $Date$
@@ -120,7 +120,7 @@
     public URI resolve(String path) {
         return targetPathURI.resolve(path);
     }
-    
+
     public URI resolve(URI path) {
         return targetPathURI.resolve(path);
     }
@@ -157,7 +157,7 @@
     }
 
     public void close() {
-        DeploymentUtil.close(moduleFile);
+        JarUtils.close(moduleFile);
     }
 
 
@@ -236,5 +236,5 @@
             rootEarContext.addChildConfiguration(getTargetPath(), moduleConfigurationData);
         }
     }
-    
+
 }

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder13NakedTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder13NakedTest.java?rev=896339&r1=896338&r2=896339&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder13NakedTest.java (original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder13NakedTest.java Wed Jan  6 07:29:20 2010
@@ -16,8 +16,8 @@
  */
 package org.apache.geronimo.j2ee.deployment;
 
-import org.apache.geronimo.deployment.util.DeploymentUtil;
 import org.apache.geronimo.kernel.repository.Artifact;
+import org.apache.geronimo.kernel.util.JarUtils;
 
 /**
  * EAR config builder tests for naked J2EE 1.3.
@@ -30,7 +30,7 @@
     protected void setUp() throws Exception {
         super.setUp();
 
-        earFile = DeploymentUtil.createJarFile(resolveFile("target/test-ear-j2ee_1.3-naked.ear"));
+        earFile = JarUtils.createJarFile(resolveFile("target/test-ear-j2ee_1.3-naked.ear"));
         locations.put(null, new Artifact("org.apache.geronimo.testsupport", "test-ear-javaee_5", "3.0-SNAPSHOT", "ear"));
         ejbConfigBuilder.ejbModule = new EJBModule(false, ejbModuleName, null, null, "test-ejb-jar.jar", null, null, null, null);
         webConfigBuilder.contextRoot = contextRoot;
@@ -39,7 +39,7 @@
     }
 
     protected void tearDown() throws Exception {
-        DeploymentUtil.close(earFile);
+        JarUtils.close(earFile);
         close(ejbConfigBuilder.ejbModule);
         close(webConfigBuilder.webModule);
         close(connectorConfigBuilder.connectorModule);

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder13Test.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder13Test.java?rev=896339&r1=896338&r2=896339&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder13Test.java (original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder13Test.java Wed Jan  6 07:29:20 2010
@@ -16,8 +16,8 @@
  */
 package org.apache.geronimo.j2ee.deployment;
 
-import org.apache.geronimo.deployment.util.DeploymentUtil;
 import org.apache.geronimo.kernel.repository.Artifact;
+import org.apache.geronimo.kernel.util.JarUtils;
 
 /**
  * EAR config builder tests for J2EE 1.3.
@@ -30,7 +30,7 @@
     protected void setUp() throws Exception {
         super.setUp();
 
-        earFile = DeploymentUtil.createJarFile(resolveFile("target/test-ear-j2ee_1.3.ear"));
+        earFile = JarUtils.createJarFile(resolveFile("target/test-ear-j2ee_1.3.ear"));
         locations.put(null, new Artifact("org.apache.geronimo.testsupport", "test-ear-javaee_5", "3.0-SNAPSHOT", "ear"));
         ejbConfigBuilder.ejbModule = new EJBModule(false, ejbModuleName, null, null, "test-ejb-jar.jar", null, null, null, null);
         webConfigBuilder.contextRoot = contextRoot;
@@ -39,7 +39,7 @@
     }
 
     protected void tearDown() throws Exception {
-        DeploymentUtil.close(earFile);
+        JarUtils.close(earFile);
         close(ejbConfigBuilder.ejbModule);
         close(webConfigBuilder.webModule);
         close(connectorConfigBuilder.connectorModule);

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder14AltDDTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder14AltDDTest.java?rev=896339&r1=896338&r2=896339&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder14AltDDTest.java (original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder14AltDDTest.java Wed Jan  6 07:29:20 2010
@@ -16,8 +16,8 @@
  */
 package org.apache.geronimo.j2ee.deployment;
 
-import org.apache.geronimo.deployment.util.DeploymentUtil;
 import org.apache.geronimo.kernel.repository.Artifact;
+import org.apache.geronimo.kernel.util.JarUtils;
 
 /**
  * EAR config builder tests for J2EE 1.4 using alt-dd..
@@ -29,7 +29,7 @@
 {
     protected void setUp() throws Exception {
         super.setUp();
-        earFile = DeploymentUtil.createJarFile(resolveFile("target/test-ear-j2ee_1.4.ear"));
+        earFile = JarUtils.createJarFile(resolveFile("target/test-ear-j2ee_1.4.ear"));
         locations.put(null, new Artifact("org.apache.geronimo.testsupport", "test-ear-javaee_5", "3.0-SNAPSHOT", "ear"));
         ejbConfigBuilder.ejbModule = new EJBModule(false, ejbModuleName, null, null, "ejb.jar/", null, null, null, null);
         webConfigBuilder.contextRoot = contextRoot;
@@ -38,7 +38,7 @@
     }
 
     protected void tearDown() throws Exception {
-        DeploymentUtil.close(earFile);
+        JarUtils.close(earFile);
         close(ejbConfigBuilder.ejbModule);
         close(webConfigBuilder.webModule);
         close(connectorConfigBuilder.connectorModule);

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder14AltDDUnpackedTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder14AltDDUnpackedTest.java?rev=896339&r1=896338&r2=896339&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder14AltDDUnpackedTest.java (original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder14AltDDUnpackedTest.java Wed Jan  6 07:29:20 2010
@@ -16,8 +16,8 @@
  */
 package org.apache.geronimo.j2ee.deployment;
 
-import org.apache.geronimo.deployment.util.DeploymentUtil;
 import org.apache.geronimo.kernel.repository.Artifact;
+import org.apache.geronimo.kernel.util.JarUtils;
 
 /**
  * EAR config builder tests for J2EE 1.4 using alt-dd unpacked..
@@ -29,7 +29,7 @@
 {
     protected void setUp() throws Exception {
         super.setUp();
-        earFile = DeploymentUtil.createJarFile(resolveFile("target/test-ear-j2ee_1.4-unpacked.ear"));
+        earFile = JarUtils.createJarFile(resolveFile("target/test-ear-j2ee_1.4-unpacked.ear"));
         locations.put(null, new Artifact("org.apache.geronimo.testsupport", "test-ear-javaee_5", "3.0-SNAPSHOT", "ear"));
         ejbConfigBuilder.ejbModule = new EJBModule(false, ejbModuleName, null, null, "ejb.jar/", null, null, null, null);
         webConfigBuilder.contextRoot = contextRoot;
@@ -38,7 +38,7 @@
     }
 
     protected void tearDown() throws Exception {
-        DeploymentUtil.close(earFile);
+        JarUtils.close(earFile);
         close(ejbConfigBuilder.ejbModule);
         close(webConfigBuilder.webModule);
         close(connectorConfigBuilder.connectorModule);

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder14NakedTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder14NakedTest.java?rev=896339&r1=896338&r2=896339&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder14NakedTest.java (original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder14NakedTest.java Wed Jan  6 07:29:20 2010
@@ -16,8 +16,8 @@
  */
 package org.apache.geronimo.j2ee.deployment;
 
-import org.apache.geronimo.deployment.util.DeploymentUtil;
 import org.apache.geronimo.kernel.repository.Artifact;
+import org.apache.geronimo.kernel.util.JarUtils;
 
 /**
  * EAR config builder tests for naked J2EE 1.4.
@@ -30,7 +30,7 @@
     protected void setUp() throws Exception {
         super.setUp();
 
-        earFile = DeploymentUtil.createJarFile(resolveFile("target/test-ear-j2ee_1.4-naked.ear"));
+        earFile = JarUtils.createJarFile(resolveFile("target/test-ear-j2ee_1.4-naked.ear"));
         locations.put(null, new Artifact("org.apache.geronimo.testsupport", "test-ear-javaee_5", "3.0-SNAPSHOT", "ear"));
         ejbConfigBuilder.ejbModule = new EJBModule(false, ejbModuleName, null, null, "test-ejb-jar.jar", null, null, null, null);
         webConfigBuilder.contextRoot = contextRoot;
@@ -39,7 +39,7 @@
     }
 
     protected void tearDown() throws Exception {
-        DeploymentUtil.close(earFile);
+        JarUtils.close(earFile);
         close(ejbConfigBuilder.ejbModule);
         close(webConfigBuilder.webModule);
         close(connectorConfigBuilder.connectorModule);

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder14NakedUnpackedTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder14NakedUnpackedTest.java?rev=896339&r1=896338&r2=896339&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder14NakedUnpackedTest.java (original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder14NakedUnpackedTest.java Wed Jan  6 07:29:20 2010
@@ -16,8 +16,8 @@
  */
 package org.apache.geronimo.j2ee.deployment;
 
-import org.apache.geronimo.deployment.util.DeploymentUtil;
 import org.apache.geronimo.kernel.repository.Artifact;
+import org.apache.geronimo.kernel.util.JarUtils;
 
 /**
  * EAR config builder tests for naked J2EE 1.4 unpacked.
@@ -30,7 +30,7 @@
     protected void setUp() throws Exception {
         super.setUp();
 
-        earFile = DeploymentUtil.createJarFile(resolveFile("target/test-ear-j2ee_1.4-naked-unpacked.ear"));
+        earFile = JarUtils.createJarFile(resolveFile("target/test-ear-j2ee_1.4-naked-unpacked.ear"));
         locations.put(null, new Artifact("org.apache.geronimo.testsupport", "test-ear-javaee_5", "3.0-SNAPSHOT", "ear"));
         ejbConfigBuilder.ejbModule = new EJBModule(false, ejbModuleName, null, null, "ejb.jar/", null, null, null, null);
         webConfigBuilder.contextRoot = contextRoot;
@@ -39,7 +39,7 @@
     }
 
     protected void tearDown() throws Exception {
-        DeploymentUtil.close(earFile);
+        JarUtils.close(earFile);
         close(ejbConfigBuilder.ejbModule);
         close(webConfigBuilder.webModule);
         close(connectorConfigBuilder.connectorModule);

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder14Test.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder14Test.java?rev=896339&r1=896338&r2=896339&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder14Test.java (original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder14Test.java Wed Jan  6 07:29:20 2010
@@ -16,8 +16,8 @@
  */
 package org.apache.geronimo.j2ee.deployment;
 
-import org.apache.geronimo.deployment.util.DeploymentUtil;
 import org.apache.geronimo.kernel.repository.Artifact;
+import org.apache.geronimo.kernel.util.JarUtils;
 
 /**
  * EAR config builder tests for J2EE 1.4.
@@ -30,7 +30,7 @@
     protected void setUp() throws Exception {
         super.setUp();
 
-        earFile = DeploymentUtil.createJarFile(resolveFile("target/test-ear-j2ee_1.4.ear"));
+        earFile = JarUtils.createJarFile(resolveFile("target/test-ear-j2ee_1.4.ear"));
         locations.put(null, new Artifact("org.apache.geronimo.testsupport", "test-ear-javaee_5", "3.0-SNAPSHOT", "ear"));
         ejbConfigBuilder.ejbModule = new EJBModule(false, ejbModuleName, null, null, "ejb.jar", null, null, null, null);
         webConfigBuilder.contextRoot = contextRoot;
@@ -39,7 +39,7 @@
     }
 
     protected void tearDown() throws Exception {
-        DeploymentUtil.close(earFile);
+        JarUtils.close(earFile);
         close(ejbConfigBuilder.ejbModule);
         close(webConfigBuilder.webModule);
         close(connectorConfigBuilder.connectorModule);

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder14UnpackedTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder14UnpackedTest.java?rev=896339&r1=896338&r2=896339&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder14UnpackedTest.java (original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder14UnpackedTest.java Wed Jan  6 07:29:20 2010
@@ -16,7 +16,7 @@
  */
 package org.apache.geronimo.j2ee.deployment;
 
-import org.apache.geronimo.deployment.util.DeploymentUtil;
+import org.apache.geronimo.kernel.util.JarUtils;
 import org.apache.geronimo.kernel.repository.Artifact;
 
 /**
@@ -30,7 +30,7 @@
     protected void setUp() throws Exception {
         super.setUp();
 
-        earFile = DeploymentUtil.createJarFile(resolveFile("target/test-ear-j2ee_1.4-unpacked.ear"));
+        earFile = JarUtils.createJarFile(resolveFile("target/test-ear-j2ee_1.4-unpacked.ear"));
         locations.put(null, new Artifact("org.apache.geronimo.testsupport", "test-ear-javaee_5", "3.0-SNAPSHOT", "ear"));
         ejbConfigBuilder.ejbModule = new EJBModule(false, ejbModuleName, null, null, "ejb.jar/", null, null, null, null);
         webConfigBuilder.contextRoot = contextRoot;
@@ -39,7 +39,7 @@
     }
 
     protected void tearDown() throws Exception {
-        DeploymentUtil.close(earFile);
+        JarUtils.close(earFile);
         close(ejbConfigBuilder.ejbModule);
         close(webConfigBuilder.webModule);
         close(connectorConfigBuilder.connectorModule);

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder5AltDDTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder5AltDDTest.java?rev=896339&r1=896338&r2=896339&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder5AltDDTest.java (original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder5AltDDTest.java Wed Jan  6 07:29:20 2010
@@ -16,7 +16,7 @@
  */
 package org.apache.geronimo.j2ee.deployment;
 
-import org.apache.geronimo.deployment.util.DeploymentUtil;
+import org.apache.geronimo.kernel.util.JarUtils;
 import org.apache.geronimo.kernel.repository.Artifact;
 
 /**
@@ -29,7 +29,7 @@
 {
     protected void setUp() throws Exception {
         super.setUp();
-        earFile = DeploymentUtil.createJarFile(resolveFile("target/test-ear-javaee_5.ear"));
+        earFile = JarUtils.createJarFile(resolveFile("target/test-ear-javaee_5.ear"));
         locations.put(null, new Artifact("org.apache.geronimo.testsupport", "test-ear-javaee_5", "3.0-SNAPSHOT", "ear"));
         ejbConfigBuilder.ejbModule = new EJBModule(false, ejbModuleName, null, null, "ejb.jar/", null, null, null, null);
         webConfigBuilder.contextRoot = contextRoot;
@@ -38,7 +38,7 @@
     }
 
     protected void tearDown() throws Exception {
-        DeploymentUtil.close(earFile);
+        JarUtils.close(earFile);
         close(ejbConfigBuilder.ejbModule);
         close(webConfigBuilder.webModule);
         close(connectorConfigBuilder.connectorModule);

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder5AltDDUnpackedTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder5AltDDUnpackedTest.java?rev=896339&r1=896338&r2=896339&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder5AltDDUnpackedTest.java (original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder5AltDDUnpackedTest.java Wed Jan  6 07:29:20 2010
@@ -16,7 +16,7 @@
  */
 package org.apache.geronimo.j2ee.deployment;
 
-import org.apache.geronimo.deployment.util.DeploymentUtil;
+import org.apache.geronimo.kernel.util.JarUtils;
 import org.apache.geronimo.kernel.repository.Artifact;
 
 /**
@@ -29,7 +29,7 @@
 {
     protected void setUp() throws Exception {
         super.setUp();
-        earFile = DeploymentUtil.createJarFile(resolveFile("target/test-ear-javaee_5-unpacked.ear"));
+        earFile = JarUtils.createJarFile(resolveFile("target/test-ear-javaee_5-unpacked.ear"));
         locations.put(null, new Artifact("org.apache.geronimo.testsupport", "test-ear-javaee_5", "3.0-SNAPSHOT", "ear"));
         ejbConfigBuilder.ejbModule = new EJBModule(false, ejbModuleName, null, null, "ejb.jar/", null, null, null, null);
         webConfigBuilder.contextRoot = contextRoot;
@@ -38,7 +38,7 @@
     }
 
     protected void tearDown() throws Exception {
-        DeploymentUtil.close(earFile);
+        JarUtils.close(earFile);
         close(ejbConfigBuilder.ejbModule);
         close(webConfigBuilder.webModule);
         close(connectorConfigBuilder.connectorModule);

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder5NakedTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder5NakedTest.java?rev=896339&r1=896338&r2=896339&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder5NakedTest.java (original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder5NakedTest.java Wed Jan  6 07:29:20 2010
@@ -16,7 +16,7 @@
  */
 package org.apache.geronimo.j2ee.deployment;
 
-import org.apache.geronimo.deployment.util.DeploymentUtil;
+import org.apache.geronimo.kernel.util.JarUtils;
 import org.apache.geronimo.kernel.repository.Artifact;
 
 /**
@@ -30,7 +30,7 @@
     protected void setUp() throws Exception {
         super.setUp();
 
-        earFile = DeploymentUtil.createJarFile(resolveFile("target/test-ear-javaee_5-naked.ear"));
+        earFile = JarUtils.createJarFile(resolveFile("target/test-ear-javaee_5-naked.ear"));
         locations.put(null, new Artifact("org.apache.geronimo.testsupport", "test-ear-javaee_5", "3.0-SNAPSHOT", "ear"));
         ejbConfigBuilder.ejbModule = new EJBModule(false, ejbModuleName, null, null, "test-ejb-jar.jar", null, null, null, null);
         webConfigBuilder.contextRoot = contextRoot;
@@ -39,7 +39,7 @@
     }
 
     protected void tearDown() throws Exception {
-        DeploymentUtil.close(earFile);
+        JarUtils.close(earFile);
         close(ejbConfigBuilder.ejbModule);
         close(webConfigBuilder.webModule);
         close(connectorConfigBuilder.connectorModule);

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder5NakedUnpackedTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder5NakedUnpackedTest.java?rev=896339&r1=896338&r2=896339&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder5NakedUnpackedTest.java (original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder5NakedUnpackedTest.java Wed Jan  6 07:29:20 2010
@@ -16,7 +16,7 @@
  */
 package org.apache.geronimo.j2ee.deployment;
 
-import org.apache.geronimo.deployment.util.DeploymentUtil;
+import org.apache.geronimo.kernel.util.JarUtils;
 import org.apache.geronimo.kernel.repository.Artifact;
 
 /**
@@ -30,7 +30,7 @@
     protected void setUp() throws Exception {
         super.setUp();
 
-        earFile = DeploymentUtil.createJarFile(resolveFile("target/test-ear-javaee_5-naked-unpacked.ear"));
+        earFile = JarUtils.createJarFile(resolveFile("target/test-ear-javaee_5-naked-unpacked.ear"));
         locations.put(null, new Artifact("org.apache.geronimo.testsupport", "test-ear-javaee_5", "3.0-SNAPSHOT", "ear"));
         ejbConfigBuilder.ejbModule = new EJBModule(false, ejbModuleName, null, null, "ejb.jar/", null, null, null, null);
         webConfigBuilder.contextRoot = contextRoot;
@@ -39,7 +39,7 @@
     }
 
     protected void tearDown() throws Exception {
-        DeploymentUtil.close(earFile);
+        JarUtils.close(earFile);
         close(ejbConfigBuilder.ejbModule);
         close(webConfigBuilder.webModule);
         close(connectorConfigBuilder.connectorModule);

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder5Test.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder5Test.java?rev=896339&r1=896338&r2=896339&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder5Test.java (original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder5Test.java Wed Jan  6 07:29:20 2010
@@ -16,7 +16,7 @@
  */
 package org.apache.geronimo.j2ee.deployment;
 
-import org.apache.geronimo.deployment.util.DeploymentUtil;
+import org.apache.geronimo.kernel.util.JarUtils;
 import org.apache.geronimo.kernel.repository.Artifact;
 
 /**
@@ -30,7 +30,7 @@
     protected void setUp() throws Exception {
         super.setUp();
 
-        earFile = DeploymentUtil.createJarFile(resolveFile("target/test-ear-javaee_5.ear"));
+        earFile = JarUtils.createJarFile(resolveFile("target/test-ear-javaee_5.ear"));
         locations.put(null, new Artifact("org.apache.geronimo.testsupport", "test-ear-javaee_5", "3.0-SNAPSHOT", "ear"));
         ejbConfigBuilder.ejbModule = new EJBModule(false, ejbModuleName, null, null, "ejb.jar", null, null, null, null);
         webConfigBuilder.contextRoot = contextRoot;
@@ -39,7 +39,7 @@
     }
 
     protected void tearDown() throws Exception {
-        DeploymentUtil.close(earFile);
+        JarUtils.close(earFile);
         close(ejbConfigBuilder.ejbModule);
         close(webConfigBuilder.webModule);
         close(connectorConfigBuilder.connectorModule);

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder5UnpackedTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder5UnpackedTest.java?rev=896339&r1=896338&r2=896339&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder5UnpackedTest.java (original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder5UnpackedTest.java Wed Jan  6 07:29:20 2010
@@ -16,7 +16,7 @@
  */
 package org.apache.geronimo.j2ee.deployment;
 
-import org.apache.geronimo.deployment.util.DeploymentUtil;
+import org.apache.geronimo.kernel.util.JarUtils;
 import org.apache.geronimo.kernel.repository.Artifact;
 
 /**
@@ -30,7 +30,7 @@
     protected void setUp() throws Exception {
         super.setUp();
 
-        earFile = DeploymentUtil.createJarFile(resolveFile("target/test-ear-javaee_5-unpacked.ear"));
+        earFile = JarUtils.createJarFile(resolveFile("target/test-ear-javaee_5-unpacked.ear"));
         locations.put(null, new Artifact("org.apache.geronimo.testsupport", "test-ear-javaee_5", "3.0-SNAPSHOT", "ear"));
         ejbConfigBuilder.ejbModule = new EJBModule(false, ejbModuleName, null, null, "ejb.jar/", null, null, null, null);
         webConfigBuilder.contextRoot = contextRoot;
@@ -39,7 +39,7 @@
     }
 
     protected void tearDown() throws Exception {
-        DeploymentUtil.close(earFile);
+        JarUtils.close(earFile);
         close(ejbConfigBuilder.ejbModule);
         close(webConfigBuilder.webModule);
         close(connectorConfigBuilder.connectorModule);

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilderTestSupport.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilderTestSupport.java?rev=896339&r1=896338&r2=896339&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilderTestSupport.java (original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilderTestSupport.java Wed Jan  6 07:29:20 2010
@@ -18,28 +18,27 @@
 
 import java.util.Collection;
 import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
 import java.util.Map;
 import java.util.Set;
-import java.util.HashSet;
-import java.util.HashMap;
 import java.util.jar.JarFile;
 
 import org.apache.geronimo.common.DeploymentException;
 import org.apache.geronimo.deployment.DeploymentContext;
 import org.apache.geronimo.deployment.ModuleIDBuilder;
 import org.apache.geronimo.deployment.NamespaceDrivenBuilder;
-import org.apache.geronimo.deployment.util.DeploymentUtil;
 import org.apache.geronimo.gbean.AbstractName;
 import org.apache.geronimo.gbean.AbstractNameQuery;
 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
 import org.apache.geronimo.j2ee.management.impl.J2EEServerImpl;
 import org.apache.geronimo.kernel.Jsr77Naming;
 import org.apache.geronimo.kernel.Naming;
-import org.apache.geronimo.kernel.osgi.MockBundleContext;
 import org.apache.geronimo.kernel.config.ConfigurationData;
 import org.apache.geronimo.kernel.mock.MockConfigStore;
-import org.apache.geronimo.kernel.mock.MockRepository;
 import org.apache.geronimo.kernel.mock.MockConfigurationManager;
+import org.apache.geronimo.kernel.mock.MockRepository;
+import org.apache.geronimo.kernel.osgi.MockBundleContext;
 import org.apache.geronimo.kernel.repository.Artifact;
 import org.apache.geronimo.kernel.repository.ArtifactManager;
 import org.apache.geronimo.kernel.repository.ArtifactResolver;
@@ -48,6 +47,7 @@
 import org.apache.geronimo.kernel.repository.Environment;
 import org.apache.geronimo.kernel.repository.ImportType;
 import org.apache.geronimo.kernel.repository.ListableRepository;
+import org.apache.geronimo.kernel.util.FileUtils;
 import org.apache.geronimo.testsupport.TestSupport;
 
 /**
@@ -59,27 +59,27 @@
     extends TestSupport
 {
     protected static String WEB_NAMESPACE = "foo";
-    
+
     protected static JarFile earFile;
-    
+
     protected static MockConfigStore configStore = new MockConfigStore();
-    
+
     protected static ArtifactManager artifactManager = new DefaultArtifactManager();
-    
+
     protected static MockEJBConfigBuilder ejbConfigBuilder = new MockEJBConfigBuilder();
-    
+
     protected static MockWARConfigBuilder webConfigBuilder = new MockWARConfigBuilder();
-    
+
     protected static MockConnectorConfigBuilder connectorConfigBuilder = new MockConnectorConfigBuilder();
-    
+
     protected static ActivationSpecInfoLocator activationSpecInfoLocator = connectorConfigBuilder;
-    
+
     protected static ModuleBuilder appClientConfigBuilder = null;
-    
+
     protected final static ModuleIDBuilder idBuilder = new ModuleIDBuilder();
-    
+
     protected static final NamespaceDrivenBuilder securityBuilder = null;
-    
+
     protected static final NamespaceDrivenBuilder serviceBuilder = null;
 
     protected static final ModuleBuilderExtension persistenceUnitBuilder = null;
@@ -87,38 +87,38 @@
     protected static final Naming naming = new Jsr77Naming();
 
     protected static final AbstractName rootConfig = naming.createRootName(new Artifact("test", "stuff", "", "car"), "test", "test") ;
-    
+
     protected static final AbstractName transactionManagerObjectName = naming.createChildName(rootConfig, "TransactionManager", "TransactionManager");
-    
+
     protected static final AbstractName connectionTrackerObjectName = naming.createChildName(rootConfig, "ConnectionTracker", "ConnectionTracker");
-    
+
     protected static final AbstractName transactionalTimerObjectName = naming.createChildName(rootConfig, "TransactionalThreaPooledTimer", "ThreadPooledTimer");
-    
+
     protected static final AbstractName nonTransactionalTimerObjectName = naming.createChildName(rootConfig, "NonTransactionalThreaPooledTimer", "ThreadPooledTimer");
-    
+
     protected static final AbstractName serverName = naming.createChildName(rootConfig, "J2EEServer", "Server");
-    
+
     protected static final AbstractName earName = naming.createRootName(new Artifact("org.apache.geronimo.test.test-ear", "ear", "", "ear"), "test", NameFactory.J2EE_APPLICATION);
-    
+
     protected static final AbstractName ejbModuleName = naming.createChildName(earName, "ejb-jar", NameFactory.EJB_MODULE);
-    
+
     protected static final AbstractName webModuleName = naming.createChildName(earName, "war", NameFactory.WEB_MODULE);
-    
+
     protected static final AbstractName raModuleName = naming.createChildName(earName, "rar", NameFactory.RESOURCE_ADAPTER_MODULE);
 
 
     protected Map<String, Artifact> locations = new HashMap<String, Artifact>();
 
     protected Environment defaultParentId;
-    
+
     protected static String contextRoot = "test";
-    
+
     protected static final Map portMap = null;
-    
+
     protected final AbstractNameQuery transactionManagerAbstractNameQuery = new AbstractNameQuery(transactionManagerObjectName, null);
-    
+
     protected final AbstractNameQuery connectionTrackerAbstractNameQuery = new AbstractNameQuery(connectionTrackerObjectName, null);
-    
+
     protected final AbstractNameQuery corbaGBeanAbstractNameQuery = new AbstractNameQuery(serverName, null);
 
     private ListableRepository repository;
@@ -165,7 +165,7 @@
                 context.close();
             }
             if (configurationData != null) {
-                DeploymentUtil.recursiveDelete(configurationData.getConfigurationDir());
+                FileUtils.recursiveDelete(configurationData.getConfigurationDir());
             }
         }
     }
@@ -200,7 +200,7 @@
                 context.close();
             }
             if (configurationData != null) {
-                DeploymentUtil.recursiveDelete(configurationData.getConfigurationDir());
+                FileUtils.recursiveDelete(configurationData.getConfigurationDir());
             }
         }
     }
@@ -235,7 +235,7 @@
                 context.close();
             }
             if (configurationData != null) {
-                DeploymentUtil.recursiveDelete(configurationData.getConfigurationDir());
+                FileUtils.recursiveDelete(configurationData.getConfigurationDir());
             }
         }
     }
@@ -270,7 +270,7 @@
                 context.close();
             }
             if (configurationData != null) {
-                DeploymentUtil.recursiveDelete(configurationData.getConfigurationDir());
+                FileUtils.recursiveDelete(configurationData.getConfigurationDir());
             }
         }
     }
@@ -305,7 +305,7 @@
                 context.close();
             }
             if (configurationData != null) {
-                DeploymentUtil.recursiveDelete(configurationData.getConfigurationDir());
+                FileUtils.recursiveDelete(configurationData.getConfigurationDir());
             }
         }
     }
@@ -341,7 +341,7 @@
                 context.close();
             }
             if (configurationData != null) {
-                DeploymentUtil.recursiveDelete(configurationData.getConfigurationDir());
+                FileUtils.recursiveDelete(configurationData.getConfigurationDir());
             }
         }
     }
@@ -376,7 +376,7 @@
                 context.close();
             }
             if (configurationData != null) {
-                DeploymentUtil.recursiveDelete(configurationData.getConfigurationDir());
+                FileUtils.recursiveDelete(configurationData.getConfigurationDir());
             }
         }
     }
@@ -411,7 +411,7 @@
                 context.close();
             }
             if (configurationData != null) {
-                DeploymentUtil.recursiveDelete(configurationData.getConfigurationDir());
+                FileUtils.recursiveDelete(configurationData.getConfigurationDir());
             }
         }
     }

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/AbstractWebModuleBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/AbstractWebModuleBuilder.java?rev=896339&r1=896338&r2=896339&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/AbstractWebModuleBuilder.java (original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/AbstractWebModuleBuilder.java Wed Jan  6 07:29:20 2010
@@ -35,22 +35,26 @@
 import java.util.jar.JarFile;
 import java.util.zip.ZipEntry;
 
-import javax.xml.namespace.QName;
+import javax.security.auth.message.module.ServerAuthModule;
+import javax.xml.bind.JAXBException;
 import javax.xml.namespace.NamespaceContext;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.Location;
+import javax.xml.namespace.QName;
 import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.bind.JAXBException;
-import javax.security.auth.message.module.ServerAuthModule;
+import javax.xml.stream.Location;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
 
 import org.apache.geronimo.common.DeploymentException;
+import org.apache.geronimo.components.jaspi.model.AuthModuleType;
+import org.apache.geronimo.components.jaspi.model.ConfigProviderType;
+import org.apache.geronimo.components.jaspi.model.JaspiXmlUtil;
+import org.apache.geronimo.components.jaspi.model.ServerAuthConfigType;
+import org.apache.geronimo.components.jaspi.model.ServerAuthContextType;
 import org.apache.geronimo.deployment.ClassPathList;
 import org.apache.geronimo.deployment.ModuleIDBuilder;
 import org.apache.geronimo.deployment.ModuleList;
 import org.apache.geronimo.deployment.NamespaceDrivenBuilder;
 import org.apache.geronimo.deployment.NamespaceDrivenBuilderCollection;
-import org.apache.geronimo.deployment.util.DeploymentUtil;
 import org.apache.geronimo.deployment.xmlbeans.XmlBeansUtil;
 import org.apache.geronimo.gbean.AbstractName;
 import org.apache.geronimo.gbean.AbstractNameQuery;
@@ -66,15 +70,16 @@
 import org.apache.geronimo.j2ee.deployment.WebServiceBuilder;
 import org.apache.geronimo.j2ee.deployment.annotation.SecurityAnnotationHelper;
 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
+import org.apache.geronimo.kernel.GBeanAlreadyExistsException;
 import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.kernel.Naming;
-import org.apache.geronimo.kernel.GBeanAlreadyExistsException;
 import org.apache.geronimo.kernel.config.Configuration;
 import org.apache.geronimo.kernel.config.ConfigurationModuleType;
 import org.apache.geronimo.kernel.config.ConfigurationStore;
 import org.apache.geronimo.kernel.repository.Artifact;
 import org.apache.geronimo.kernel.repository.Environment;
 import org.apache.geronimo.kernel.repository.ImportType;
+import org.apache.geronimo.kernel.util.FileUtils;
 import org.apache.geronimo.naming.deployment.ResourceEnvironmentSetter;
 import org.apache.geronimo.schema.SchemaConversionUtils;
 import org.apache.geronimo.security.jacc.ComponentPermissions;
@@ -82,8 +87,8 @@
 import org.apache.geronimo.security.jaspi.ServerAuthConfigGBean;
 import org.apache.geronimo.security.jaspi.ServerAuthContextGBean;
 import org.apache.geronimo.security.jaspi.ServerAuthModuleGBean;
-import org.apache.geronimo.web25.deployment.security.SpecSecurityBuilder;
 import org.apache.geronimo.web25.deployment.security.AuthenticationWrapper;
+import org.apache.geronimo.web25.deployment.security.SpecSecurityBuilder;
 import org.apache.geronimo.xbeans.geronimo.j2ee.GerSecurityDocument;
 import org.apache.geronimo.xbeans.javaee.FilterMappingType;
 import org.apache.geronimo.xbeans.javaee.FilterType;
@@ -96,20 +101,15 @@
 import org.apache.geronimo.xbeans.javaee.WebAppDocument;
 import org.apache.geronimo.xbeans.javaee.WebAppType;
 import org.apache.geronimo.xbeans.javaee.WebResourceCollectionType;
-import org.apache.geronimo.components.jaspi.model.ConfigProviderType;
-import org.apache.geronimo.components.jaspi.model.JaspiXmlUtil;
-import org.apache.geronimo.components.jaspi.model.ServerAuthConfigType;
-import org.apache.geronimo.components.jaspi.model.ServerAuthContextType;
-import org.apache.geronimo.components.jaspi.model.AuthModuleType;
 import org.apache.xbean.finder.ClassFinder;
 import org.apache.xmlbeans.XmlCursor;
 import org.apache.xmlbeans.XmlDocumentProperties;
 import org.apache.xmlbeans.XmlException;
 import org.apache.xmlbeans.XmlObject;
+import org.osgi.framework.Bundle;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.xml.sax.SAXException;
-import org.osgi.framework.Bundle;
 
 /**
  * @version $Rev$ $Date$
@@ -332,8 +332,6 @@
 
         } catch (IOException e) {
             throw new DeploymentException("Problem deploying war", e);
-//        } catch (URISyntaxException e) {
-//            throw new DeploymentException("Could not construct URI for location of war entry", e);
         } finally {
             if (!module.isStandAlone()) {
                 try {
@@ -619,7 +617,7 @@
     private boolean cleanupConfigurationDir(File configurationDir) {
         LinkedList<String> cannotBeDeletedList = new LinkedList<String>();
 
-        if (!DeploymentUtil.recursiveDelete(configurationDir, cannotBeDeletedList)) {
+        if (!FileUtils.recursiveDelete(configurationDir, cannotBeDeletedList)) {
             // Output a message to help user track down file problem
             log.warn("Unable to delete " + cannotBeDeletedList.size() +
                     " files while recursively deleting directory "

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/test/java/org/apache/geronimo/web25/deployment/security/SecurityConfigTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/test/java/org/apache/geronimo/web25/deployment/security/SecurityConfigTest.java?rev=896339&r1=896338&r2=896339&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/test/java/org/apache/geronimo/web25/deployment/security/SecurityConfigTest.java (original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/test/java/org/apache/geronimo/web25/deployment/security/SecurityConfigTest.java Wed Jan  6 07:29:20 2010
@@ -17,35 +17,13 @@
 
 package org.apache.geronimo.web25.deployment.security;
 
-import java.io.File;
 import java.net.URL;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Set;
-import java.util.Collections;
-import java.util.ArrayList;
-import java.util.jar.JarFile;
-
-import org.apache.geronimo.common.DeploymentException;
-import org.apache.geronimo.deployment.ModuleIDBuilder;
-import org.apache.geronimo.deployment.util.DeploymentUtil;
-import org.apache.geronimo.deployment.util.UnpackedJarFile;
-import org.apache.geronimo.deployment.xmlbeans.XmlBeansUtil;
-import org.apache.geronimo.gbean.AbstractName;
-import org.apache.geronimo.j2ee.deployment.EARContext;
-import org.apache.geronimo.j2ee.deployment.Module;
-import org.apache.geronimo.j2ee.deployment.ModuleBuilderExtension;
-import org.apache.geronimo.kernel.Kernel;
-import org.apache.geronimo.kernel.Naming;
+
 import org.apache.geronimo.security.jacc.ComponentPermissions;
 import org.apache.geronimo.testsupport.TestSupport;
 import org.apache.geronimo.xbeans.javaee.WebAppDocument;
 import org.apache.geronimo.xbeans.javaee.WebAppType;
-import org.apache.geronimo.web25.deployment.AbstractWebModuleBuilder;
-import org.apache.xmlbeans.XmlObject;
 import org.apache.xmlbeans.XmlOptions;
-import org.apache.xmlbeans.XmlException;
 
 /**
  * @version $Rev$ $Date$

Modified: geronimo/server/trunk/plugins/jaxws/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/JAXWSServiceBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jaxws/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/JAXWSServiceBuilder.java?rev=896339&r1=896338&r2=896339&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/jaxws/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/JAXWSServiceBuilder.java (original)
+++ geronimo/server/trunk/plugins/jaxws/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/JAXWSServiceBuilder.java Wed Jan  6 07:29:20 2010
@@ -25,12 +25,9 @@
 
 import javax.xml.ws.http.HTTPBinding;
 
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.apache.geronimo.common.DeploymentException;
 import org.apache.geronimo.deployment.DeploymentContext;
 import org.apache.geronimo.deployment.service.EnvironmentBuilder;
-import org.apache.geronimo.deployment.util.DeploymentUtil;
 import org.apache.geronimo.gbean.AbstractName;
 import org.apache.geronimo.gbean.GBeanData;
 import org.apache.geronimo.gbean.GBeanInfo;
@@ -40,14 +37,16 @@
 import org.apache.geronimo.j2ee.deployment.Module;
 import org.apache.geronimo.j2ee.deployment.WebModule;
 import org.apache.geronimo.j2ee.deployment.WebServiceBuilder;
-import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
 import org.apache.geronimo.jaxws.JAXWSUtils;
 import org.apache.geronimo.jaxws.PortInfo;
 import org.apache.geronimo.jaxws.annotations.AnnotationHolder;
 import org.apache.geronimo.kernel.GBeanAlreadyExistsException;
 import org.apache.geronimo.kernel.GBeanNotFoundException;
 import org.apache.geronimo.kernel.repository.Environment;
+import org.apache.geronimo.kernel.util.JarUtils;
 import org.osgi.framework.Bundle;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public abstract class JAXWSServiceBuilder implements WebServiceBuilder {
     private static final Logger LOG = LoggerFactory.getLogger(JAXWSServiceBuilder.class);
@@ -76,7 +75,7 @@
         String path = isEJB ? "META-INF/webservices.xml" : "WEB-INF/webservices.xml";
         JarFile moduleFile = module.getModuleFile();
         try {
-            URL wsDDUrl = DeploymentUtil.createJarURL(moduleFile, path);
+            URL wsDDUrl = JarUtils.createJarURL(moduleFile, path);
             InputStream in = wsDDUrl.openStream();
             portMap = parseWebServiceDescriptor(in, wsDDUrl, moduleFile, isEJB, servletLocations);
         } catch (IOException e) {

Modified: geronimo/server/trunk/plugins/jaxws/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/WARWebServiceFinder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jaxws/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/WARWebServiceFinder.java?rev=896339&r1=896338&r2=896339&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/jaxws/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/WARWebServiceFinder.java (original)
+++ geronimo/server/trunk/plugins/jaxws/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/WARWebServiceFinder.java Wed Jan  6 07:29:20 2010
@@ -33,12 +33,13 @@
 import javax.xml.ws.WebServiceProvider;
 
 import org.apache.geronimo.common.DeploymentException;
-import org.apache.geronimo.deployment.util.DeploymentUtil;
-import org.apache.geronimo.deployment.util.NestedJarFile;
-import org.apache.geronimo.deployment.util.UnpackedJarFile;
 import org.apache.geronimo.j2ee.deployment.Module;
 import org.apache.geronimo.jaxws.PortInfo;
 import org.apache.geronimo.kernel.classloader.TemporaryClassLoader;
+import org.apache.geronimo.kernel.util.FileUtils;
+import org.apache.geronimo.kernel.util.JarUtils;
+import org.apache.geronimo.kernel.util.NestedJarFile;
+import org.apache.geronimo.kernel.util.UnpackedJarFile;
 import org.apache.xbean.finder.ClassFinder;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -108,16 +109,16 @@
                  * within it and the classes/ directory.
                  */
                 try {
-                    tmpDir = DeploymentUtil.createTempDir();
+                    tmpDir = FileUtils.createTempDir();
                     /*
-                     * This is needed becuase DeploymentUtil.unzipToDirectory()
+                     * This is needed becuase JarUtils.unzipToDirectory()
                      * always closes the passed JarFile.
                      */
                     JarFile module = new JarFile(moduleFile.getName());
-                    DeploymentUtil.unzipToDirectory(module, tmpDir);
+                    JarUtils.unzipToDirectory(module, tmpDir);
                 } catch (IOException e) {
                     if (tmpDir != null) {
-                        DeploymentUtil.recursiveDelete(tmpDir);
+                        FileUtils.recursiveDelete(tmpDir);
                     }
                     throw new DeploymentException("Failed to expand the module archive", e);
                 }
@@ -167,7 +168,7 @@
             return classes;
         } finally {
             if (tmpDir != null) {
-                DeploymentUtil.recursiveDelete(tmpDir);
+                FileUtils.recursiveDelete(tmpDir);
             }
         }
     }

Modified: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/main/java/org/apache/geronimo/jetty8/deployment/JettyModuleBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/main/java/org/apache/geronimo/jetty8/deployment/JettyModuleBuilder.java?rev=896339&r1=896338&r2=896339&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/main/java/org/apache/geronimo/jetty8/deployment/JettyModuleBuilder.java (original)
+++ geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/main/java/org/apache/geronimo/jetty8/deployment/JettyModuleBuilder.java Wed Jan  6 07:29:20 2010
@@ -22,7 +22,7 @@
 import org.apache.geronimo.deployment.NamespaceDrivenBuilder;
 import org.apache.geronimo.deployment.NamespaceDrivenBuilderCollection;
 import org.apache.geronimo.deployment.service.EnvironmentBuilder;
-import org.apache.geronimo.deployment.util.DeploymentUtil;
+import org.apache.geronimo.kernel.util.JarUtils;
 import org.apache.geronimo.deployment.xbeans.EnvironmentType;
 import org.apache.geronimo.deployment.xmlbeans.XmlBeansUtil;
 import org.apache.geronimo.gbean.AbstractName;
@@ -236,12 +236,12 @@
         WebAppType webApp = null;
         try {
             if (specDDUrl == null) {
-                specDDUrl = DeploymentUtil.createJarURL(moduleFile, "WEB-INF/web.xml");
+                specDDUrl = JarUtils.createJarURL(moduleFile, "WEB-INF/web.xml");
             }
 
             // read in the entire specDD as a string, we need this for getDeploymentDescriptor
             // on the J2ee management object
-            specDD = DeploymentUtil.readAll(specDDUrl);
+            specDD = JarUtils.readAll(specDDUrl);
 
             // we found web.xml, if it won't parse that's an error.
             XmlObject parsed = XmlBeansUtil.parse(specDD);
@@ -325,11 +325,11 @@
                     if (plan != null) {
                         rawPlan = XmlBeansUtil.parse(((File) plan).toURL(), getClass().getClassLoader());
                     } else {
-                        URL path = DeploymentUtil.createJarURL(moduleFile, "WEB-INF/geronimo-web.xml");
+                        URL path = JarUtils.createJarURL(moduleFile, "WEB-INF/geronimo-web.xml");
                         try {
                             rawPlan = XmlBeansUtil.parse(path, getClass().getClassLoader());
                         } catch (FileNotFoundException e) {
-                            path = DeploymentUtil.createJarURL(moduleFile, "WEB-INF/geronimo-jetty.xml");
+                            path = JarUtils.createJarURL(moduleFile, "WEB-INF/geronimo-jetty.xml");
                             try {
                                 rawPlan = XmlBeansUtil.parse(path, getClass().getClassLoader());
                             } catch (FileNotFoundException e1) {

Modified: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/java/org/apache/geronimo/jetty8/deployment/JettyModuleBuilderTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/java/org/apache/geronimo/jetty8/deployment/JettyModuleBuilderTest.java?rev=896339&r1=896338&r2=896339&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/java/org/apache/geronimo/jetty8/deployment/JettyModuleBuilderTest.java (original)
+++ geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/java/org/apache/geronimo/jetty8/deployment/JettyModuleBuilderTest.java Wed Jan  6 07:29:20 2010
@@ -23,14 +23,12 @@
 import java.util.Collection;
 import java.util.Collections;
 import java.util.HashSet;
-import java.util.Iterator;
 import java.util.Set;
 
 import org.apache.geronimo.common.DeploymentException;
 import org.apache.geronimo.connector.wrapper.outbound.connectiontracking.ConnectionTrackingCoordinatorGBean;
 import org.apache.geronimo.deployment.ModuleIDBuilder;
 import org.apache.geronimo.deployment.service.GBeanBuilder;
-import org.apache.geronimo.deployment.util.UnpackedJarFile;
 import org.apache.geronimo.gbean.AbstractName;
 import org.apache.geronimo.gbean.AbstractNameQuery;
 import org.apache.geronimo.gbean.GBeanData;
@@ -56,9 +54,9 @@
 import org.apache.geronimo.kernel.config.KernelConfigurationManager;
 import org.apache.geronimo.kernel.config.LifecycleException;
 import org.apache.geronimo.kernel.config.NoSuchConfigException;
-import org.apache.geronimo.kernel.management.State;
 import org.apache.geronimo.kernel.mock.MockConfigStore;
 import org.apache.geronimo.kernel.osgi.MockBundle;
+import org.apache.geronimo.kernel.osgi.MockBundleContext;
 import org.apache.geronimo.kernel.repository.Artifact;
 import org.apache.geronimo.kernel.repository.ArtifactManager;
 import org.apache.geronimo.kernel.repository.ArtifactResolver;
@@ -67,6 +65,7 @@
 import org.apache.geronimo.kernel.repository.Environment;
 import org.apache.geronimo.kernel.repository.ImportType;
 import org.apache.geronimo.kernel.repository.ListableRepository;
+import org.apache.geronimo.kernel.util.UnpackedJarFile;
 import org.apache.geronimo.security.SecurityServiceImpl;
 import org.apache.geronimo.security.deployment.GeronimoSecurityBuilderImpl;
 import org.apache.geronimo.security.jacc.mappingprovider.GeronimoPolicy;
@@ -77,9 +76,6 @@
 import org.apache.geronimo.transaction.wrapper.manager.GeronimoTransactionManagerGBean;
 import org.apache.geronimo.xbeans.geronimo.j2ee.GerSecurityDocument;
 import org.apache.xmlbeans.impl.schema.SchemaTypeImpl;
-import org.apache.geronimo.kernel.osgi.MockBundleContext;
-import org.osgi.framework.BundleContext;
-
 import org.osgi.framework.Bundle;
 
 /**

Modified: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/java/org/apache/geronimo/jetty8/deployment/PlanParsingTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/java/org/apache/geronimo/jetty8/deployment/PlanParsingTest.java?rev=896339&r1=896338&r2=896339&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/java/org/apache/geronimo/jetty8/deployment/PlanParsingTest.java (original)
+++ geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/java/org/apache/geronimo/jetty8/deployment/PlanParsingTest.java Wed Jan  6 07:29:20 2010
@@ -20,19 +20,16 @@
 import java.io.IOException;
 import java.net.URL;
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.Collections;
 import java.util.HashSet;
-import java.util.Arrays;
 import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.jar.JarFile;
 
 import org.apache.geronimo.deployment.service.GBeanBuilder;
-import org.apache.geronimo.deployment.util.DeploymentUtil;
-import org.apache.geronimo.deployment.util.UnpackedJarFile;
 import org.apache.geronimo.deployment.xbeans.ArtifactType;
 import org.apache.geronimo.deployment.xbeans.EnvironmentType;
 import org.apache.geronimo.deployment.xmlbeans.XmlBeansUtil;
-import org.apache.geronimo.deployment.NamespaceDrivenBuilder;
 import org.apache.geronimo.gbean.AbstractName;
 import org.apache.geronimo.gbean.AbstractNameQuery;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
@@ -43,6 +40,8 @@
 import org.apache.geronimo.kernel.Naming;
 import org.apache.geronimo.kernel.repository.Artifact;
 import org.apache.geronimo.kernel.repository.Environment;
+import org.apache.geronimo.kernel.util.JarUtils;
+import org.apache.geronimo.kernel.util.UnpackedJarFile;
 import org.apache.geronimo.schema.SchemaConversionUtils;
 import org.apache.geronimo.security.deployment.GeronimoSecurityBuilderImpl;
 import org.apache.geronimo.testsupport.XmlBeansTestSupport;
@@ -149,13 +148,13 @@
 
         XmlObject webPlan = new GenericToSpecificPlanConverter(
                 "http://geronimo.apache.org/xml/ns/web/jetty/config-1.0.1",
-                "http://geronimo.apache.org/xml/ns/j2ee/web/jetty-2.0.2", 
+                "http://geronimo.apache.org/xml/ns/j2ee/web/jetty-2.0.2",
                 "jetty").convertToSpecificPlan(rawPlan);
-        
+
         XmlObject p = webPlan.changeType(JettyWebAppType.type);
         XmlBeansUtil.validateDD(p);
     }
-    
+
     public void testOldFormatExploded() throws Exception {
         URL war = classLoader.getResource("deployables/war5");
         assertTrue(war != null);
@@ -262,7 +261,7 @@
     }
 
     private WebAppType getWebApp(JarFile dummyFile) throws IOException, XmlException {
-        URL specDDUrl = DeploymentUtil.createJarURL(dummyFile, "WEB-INF/web.xml");
+        URL specDDUrl = JarUtils.createJarURL(dummyFile, "WEB-INF/web.xml");
         XmlObject parsed = XmlBeansUtil.parse(specDDUrl, getClass().getClassLoader());
         WebAppDocument webAppDoc = (WebAppDocument) parsed.changeType(WebAppDocument.type);
         return webAppDoc.getWebApp();



Mime
View raw message