You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by xu...@apache.org on 2010/01/19 04:39:46 UTC

svn commit: r900657 - in /geronimo/server/trunk: framework/buildsupport/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/ framework/buildsupport/car-maven-plugin/src/main/resources/META-INF/plexus/ framework/modules/geronimo-deploy-t...

Author: xuhaihong
Date: Tue Jan 19 03:39:45 2010
New Revision: 900657

URL: http://svn.apache.org/viewvc?rev=900657&view=rev
Log:
GERONIMO-5009 Enable Java EE package deployment in Geronimo 3.0

Modified:
    geronimo/server/trunk/framework/buildsupport/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/ArchiveCarMojo.java
    geronimo/server/trunk/framework/buildsupport/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/CreatePluginListMojo.java
    geronimo/server/trunk/framework/buildsupport/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/MavenConfigStore.java
    geronimo/server/trunk/framework/buildsupport/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/PackageMojo.java
    geronimo/server/trunk/framework/buildsupport/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/PlanProcessorMojo.java
    geronimo/server/trunk/framework/buildsupport/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/PluginBootstrap2.java
    geronimo/server/trunk/framework/buildsupport/car-maven-plugin/src/main/resources/META-INF/plexus/components.xml
    geronimo/server/trunk/framework/modules/geronimo-deploy-tool/src/main/java/org/apache/geronimo/deployment/cli/CommandDeploy.java
    geronimo/server/trunk/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/CopyResourceContext.java
    geronimo/server/trunk/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/DeploymentContext.java
    geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/util/FileUtils.java
    geronimo/server/trunk/framework/modules/geronimo-kernel/src/test/java/org/apache/geronimo/kernel/osgi/MockBundleContext.java
    geronimo/server/trunk/framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/service/ServiceConfigBuilder.java
    geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/configuration/RepositoryConfigurationStore.java
    geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/main/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder.java
    geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/GeronimoStandardContext.java
    geronimo/server/trunk/plugins/welcome/geronimo-welcome/pom.xml
    geronimo/server/trunk/plugins/welcome/welcome-tomcat-server/pom.xml
    geronimo/server/trunk/plugins/welcome/welcome-tomcat/src/main/history/dependencies.xml

Modified: geronimo/server/trunk/framework/buildsupport/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/ArchiveCarMojo.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/buildsupport/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/ArchiveCarMojo.java?rev=900657&r1=900656&r2=900657&view=diff
==============================================================================
--- geronimo/server/trunk/framework/buildsupport/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/ArchiveCarMojo.java (original)
+++ geronimo/server/trunk/framework/buildsupport/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/ArchiveCarMojo.java Tue Jan 19 03:39:45 2010
@@ -20,9 +20,11 @@
 package org.apache.geronimo.mavenplugins.car;
 
 import java.io.File;
-import java.io.FileReader;
+import java.io.InputStreamReader;
 import java.io.Reader;
 import java.util.Map;
+import java.util.jar.JarFile;
+import java.util.zip.ZipEntry;
 
 import org.apache.geronimo.kernel.osgi.ConfigurationActivator;
 import org.apache.geronimo.system.osgi.BootActivator;
@@ -33,6 +35,7 @@
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.MojoFailureException;
 import org.codehaus.plexus.archiver.jar.JarArchiver;
+import org.codehaus.plexus.archiver.jar.JarArchiver.FilesetManifestConfig;
 import org.osgi.framework.Constants;
 
 /**
@@ -196,8 +199,9 @@
         try {
             // Incldue the generated artifact contents
             File artifactDirectory = getArtifactInRepositoryDir();
+
             if (artifactDirectory.exists()) {
-                archiver.getArchiver().addDirectory(artifactDirectory);
+                archiver.getArchiver().addArchivedFileSet(artifactDirectory);
             }
 
             // Include the optional classes.resources
@@ -227,69 +231,71 @@
             };
 
             archiver.getArchiver().addDirectory(baseDirectory, "META-INF/", includes, new String[0]);
-            File manifestFile = new File(new File(getArtifactInRepositoryDir(), "META-INF"), "MANIFEST.MF");
-            if (manifestFile.exists()) {
-                archiver.getArchiver().setManifest(manifestFile);
-            } else {
-                File configFile = new File(new File(getArtifactInRepositoryDir(), "META-INF"), "imports.txt");
-
-                if (configFile.exists()) {
-                    StringBuilder imports = new StringBuilder("org.apache.geronimo.kernel.osgi,");
-                    if (boot) {
-                        archive.addManifestEntry(Constants.BUNDLE_ACTIVATOR, BootActivator.class.getName());
-                        imports.append("org.apache.geronimo.system.osgi,");
-                    } else {
-                        archive.addManifestEntry(Constants.BUNDLE_ACTIVATOR, ConfigurationActivator.class.getName());
-                    }
-                    archive.addManifestEntry(Constants.BUNDLE_NAME, project.getName());
-                    archive.addManifestEntry(Constants.BUNDLE_VENDOR, project.getOrganization().getName());
-                    ArtifactVersion version = project.getArtifact().getSelectedVersion();
-                    String versionString = "" + version.getMajorVersion() + "." + version.getMinorVersion() + "." + version.getIncrementalVersion();
-                    if (version.getQualifier() != null) {
-                        versionString += "." + version.getQualifier();
-                    }
-                    archive.addManifestEntry(Constants.BUNDLE_VERSION, versionString);
-                    archive.addManifestEntry(Constants.BUNDLE_MANIFESTVERSION, "2");
-                    archive.addManifestEntry(Constants.BUNDLE_DESCRIPTION, project.getDescription());
-                    // NB, no constant for this one
-                    archive.addManifestEntry("Bundle-License", ((License) project.getLicenses().get(0)).getUrl());
-                    archive.addManifestEntry(Constants.BUNDLE_DOCURL, project.getUrl());
-                    archive.addManifestEntry(Constants.BUNDLE_SYMBOLICNAME, project.getGroupId() + "." + project.getArtifactId());
-                    Reader in = new FileReader(configFile);
-                    char[] buf = new char[1024];
-                    try {
-                        int i;
-                        while ((i = in.read(buf)) > 0) {
-                            imports.append(buf, 0, i);
-                        }
-                    } finally {
-                        in.close();
-                    }
 
-                    // do we have any additional processing directives?
-                    if (instructions != null) {
-                        String explicitImports = (String) instructions.get(Constants.IMPORT_PACKAGE);
-                        // if there is an Import-Package instructions, then add these imports to the
-                        // list
-                        if (explicitImports != null) {
-                            // if specified on multiple lines, remove the line-ends.
-                            explicitImports = explicitImports.replaceAll("[\r\n]", "");
-                            imports.append(',');
-                            imports.append(explicitImports);
+            //For no plan car, do nothing
+            if (artifactDirectory.exists()) {
+                JarFile includedJarFile = new JarFile(getArtifactInRepositoryDir());
+                if (includedJarFile.getEntry("META-INF/MANIFEST.MF") != null) {
+                    FilesetManifestConfig mergeFilesetManifestConfig = new FilesetManifestConfig();
+                    mergeFilesetManifestConfig.setValue("merge");
+                    archiver.getArchiver().setFilesetmanifest(mergeFilesetManifestConfig);
+                } else {
+                    //File configFile = new File(new File(getArtifactInRepositoryDir(), "META-INF"), "imports.txt");
+                    ZipEntry importTxtEntry = includedJarFile.getEntry("META-INFO/imports.txt");
+                    if (importTxtEntry != null) {
+                        StringBuilder imports = new StringBuilder("org.apache.geronimo.kernel.osgi,");
+                        if (boot) {
+                            archive.addManifestEntry(Constants.BUNDLE_ACTIVATOR, BootActivator.class.getName());
+                            imports.append("org.apache.geronimo.system.osgi,");
+                        } else {
+                            archive.addManifestEntry(Constants.BUNDLE_ACTIVATOR, ConfigurationActivator.class.getName());
                         }
-
-                        String requiredBundles = (String) instructions.get(Constants.REQUIRE_BUNDLE);
-                        if (requiredBundles != null) {
-                            requiredBundles = requiredBundles.replaceAll("[\r\n]", "");
-                            archive.addManifestEntry(Constants.REQUIRE_BUNDLE, requiredBundles);
+                        archive.addManifestEntry(Constants.BUNDLE_NAME, project.getName());
+                        archive.addManifestEntry(Constants.BUNDLE_VENDOR, project.getOrganization().getName());
+                        ArtifactVersion version = project.getArtifact().getSelectedVersion();
+                        String versionString = "" + version.getMajorVersion() + "." + version.getMinorVersion() + "." + version.getIncrementalVersion();
+                        if (version.getQualifier() != null) {
+                            versionString += "." + version.getQualifier();
+                        }
+                        archive.addManifestEntry(Constants.BUNDLE_VERSION, versionString);
+                        archive.addManifestEntry(Constants.BUNDLE_MANIFESTVERSION, "2");
+                        archive.addManifestEntry(Constants.BUNDLE_DESCRIPTION, project.getDescription());
+                        // NB, no constant for this one
+                        archive.addManifestEntry("Bundle-License", ((License) project.getLicenses().get(0)).getUrl());
+                        archive.addManifestEntry(Constants.BUNDLE_DOCURL, project.getUrl());
+                        archive.addManifestEntry(Constants.BUNDLE_SYMBOLICNAME, project.getGroupId() + "." + project.getArtifactId());
+                        Reader in = new InputStreamReader(includedJarFile.getInputStream(importTxtEntry));
+                        char[] buf = new char[1024];
+                        try {
+                            int i;
+                            while ((i = in.read(buf)) > 0) {
+                                imports.append(buf, 0, i);
+                            }
+                        } finally {
+                            in.close();
+                        }
+                        // do we have any additional processing directives?
+                        if (instructions != null) {
+                            String explicitImports = (String) instructions.get(Constants.IMPORT_PACKAGE);
+                            // if there is an Import-Package instructions, then add these imports to the
+                            // list
+                            if (explicitImports != null) {
+                                // if specified on multiple lines, remove the line-ends.
+                                explicitImports = explicitImports.replaceAll("[\r\n]", "");
+                                imports.append(',');
+                                imports.append(explicitImports);
+                            }
+                            String requiredBundles = (String) instructions.get(Constants.REQUIRE_BUNDLE);
+                            if (requiredBundles != null) {
+                                requiredBundles = requiredBundles.replaceAll("[\r\n]", "");
+                                archive.addManifestEntry(Constants.REQUIRE_BUNDLE, requiredBundles);
+                            }
                         }
+                        archive.addManifestEntry(Constants.IMPORT_PACKAGE, imports.toString());
+                        archive.addManifestEntry(Constants.DYNAMICIMPORT_PACKAGE, "*");
                     }
-
-                    archive.addManifestEntry(Constants.IMPORT_PACKAGE, imports.toString());
-                    archive.addManifestEntry(Constants.DYNAMICIMPORT_PACKAGE, "*");
                 }
             }
-
             archiver.createArchive(project, archive);
 
             return archiveFile;

Modified: geronimo/server/trunk/framework/buildsupport/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/CreatePluginListMojo.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/buildsupport/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/CreatePluginListMojo.java?rev=900657&r1=900656&r2=900657&view=diff
==============================================================================
--- geronimo/server/trunk/framework/buildsupport/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/CreatePluginListMojo.java (original)
+++ geronimo/server/trunk/framework/buildsupport/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/CreatePluginListMojo.java Tue Jan 19 03:39:45 2010
@@ -30,18 +30,18 @@
 import java.util.jar.JarFile;
 import java.util.zip.ZipEntry;
 import java.util.zip.ZipException;
-import java.lang.*;
 
 import javax.xml.bind.JAXBException;
 import javax.xml.stream.XMLStreamException;
 
 import org.apache.geronimo.kernel.config.NoSuchStoreException;
-import org.apache.geronimo.kernel.repository.*;
 import org.apache.geronimo.kernel.repository.Artifact;
+import org.apache.geronimo.kernel.repository.ListableRepository;
+import org.apache.geronimo.kernel.repository.Maven2Repository;
 import org.apache.geronimo.system.plugin.PluginInstallerGBean;
-import org.apache.geronimo.system.plugin.model.PluginXmlUtil;
 import org.apache.geronimo.system.plugin.model.PluginListType;
 import org.apache.geronimo.system.plugin.model.PluginType;
+import org.apache.geronimo.system.plugin.model.PluginXmlUtil;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.MojoFailureException;
 import org.xml.sax.SAXException;

Modified: geronimo/server/trunk/framework/buildsupport/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/MavenConfigStore.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/buildsupport/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/MavenConfigStore.java?rev=900657&r1=900656&r2=900657&view=diff
==============================================================================
--- geronimo/server/trunk/framework/buildsupport/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/MavenConfigStore.java (original)
+++ geronimo/server/trunk/framework/buildsupport/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/MavenConfigStore.java Tue Jan 19 03:39:45 2010
@@ -25,14 +25,13 @@
 
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
+import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.kernel.config.ConfigurationData;
+import org.apache.geronimo.kernel.config.ConfigurationInfo;
 import org.apache.geronimo.kernel.config.InvalidConfigException;
-import org.apache.geronimo.kernel.config.NoOConfigurationDataTransformer;
 import org.apache.geronimo.kernel.config.NoSuchConfigException;
-import org.apache.geronimo.kernel.config.ConfigurationInfo;
 import org.apache.geronimo.kernel.repository.Artifact;
 import org.apache.geronimo.kernel.repository.WritableListableRepository;
-import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.system.configuration.ExecutableConfigurationUtil;
 import org.apache.geronimo.system.configuration.RepositoryConfigurationStore;
 
@@ -78,7 +77,7 @@
         if (!source.isDirectory()) {
             throw new InvalidConfigException("Source must be a directory: " + source);
         }
-        
+
         Artifact configId = configurationData.getId();
         File targetFile = repository.getLocation(configId);
         ExecutableConfigurationUtil.createExecutableConfiguration(configurationData, null, targetFile);

Modified: geronimo/server/trunk/framework/buildsupport/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/PackageMojo.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/buildsupport/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/PackageMojo.java?rev=900657&r1=900656&r2=900657&view=diff
==============================================================================
--- geronimo/server/trunk/framework/buildsupport/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/PackageMojo.java (original)
+++ geronimo/server/trunk/framework/buildsupport/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/PackageMojo.java Tue Jan 19 03:39:45 2010
@@ -199,7 +199,7 @@
     public void execute() throws MojoExecutionException, MojoFailureException {
         Map<String, String> oldSystemProperties = setSystemProperties();
         try {
-// We need to make sure to clean up any previous work first or this operation will fail
+            // We need to make sure to clean up any previous work first or this operation will fail
             FileUtils.forceDelete(targetRepository);
             FileUtils.forceMkdir(targetRepository);
 
@@ -209,10 +209,10 @@
 
             // Use the default configs if none specified
             if (deploymentConfigs == null) {
-                if (!bootstrap) {
-                    deploymentConfigs = new String[]{defaultDeploymentConfig};
-                } else {
+                if (bootstrap) {
                     deploymentConfigs = new String[]{};
+                } else {
+                    deploymentConfigs = new String[]{defaultDeploymentConfig};
                 }
             }
             getLog().debug("Deployment configs: " + Arrays.asList(deploymentConfigs));
@@ -303,8 +303,8 @@
         BundleContext bundleContext = framework.getBundleContext();
         boot.setBundleContext(bundleContext);
 
-        // Generate expanded so we can use Maven to generate the archive
-        boot.setExpanded(true);
+        // Keep the same behavior with RepositoryConfigurationStore
+        boot.setExpanded(false);
 
         boot.bootstrap();
     }

Modified: geronimo/server/trunk/framework/buildsupport/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/PlanProcessorMojo.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/buildsupport/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/PlanProcessorMojo.java?rev=900657&r1=900656&r2=900657&view=diff
==============================================================================
--- geronimo/server/trunk/framework/buildsupport/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/PlanProcessorMojo.java (original)
+++ geronimo/server/trunk/framework/buildsupport/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/PlanProcessorMojo.java Tue Jan 19 03:39:45 2010
@@ -23,7 +23,6 @@
 import java.util.Collections;
 import java.util.LinkedHashSet;
 import java.util.List;
-import java.util.ArrayList;
 
 import javax.xml.namespace.QName;
 
@@ -32,8 +31,8 @@
 import org.apache.geronimo.deployment.xbeans.EnvironmentType;
 import org.apache.geronimo.kernel.repository.Artifact;
 import org.apache.geronimo.kernel.repository.Environment;
-import org.apache.geronimo.system.plugin.model.DependencyType;
 import org.apache.geronimo.system.osgi.BootActivator;
+import org.apache.geronimo.system.plugin.model.DependencyType;
 import org.apache.maven.artifact.resolver.ArtifactResolutionException;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.MojoFailureException;

Modified: geronimo/server/trunk/framework/buildsupport/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/PluginBootstrap2.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/buildsupport/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/PluginBootstrap2.java?rev=900657&r1=900656&r2=900657&view=diff
==============================================================================
--- geronimo/server/trunk/framework/buildsupport/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/PluginBootstrap2.java (original)
+++ geronimo/server/trunk/framework/buildsupport/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/PluginBootstrap2.java Tue Jan 19 03:39:45 2010
@@ -23,13 +23,11 @@
 import java.util.Collections;
 import java.util.jar.JarOutputStream;
 
-import org.apache.geronimo.deployment.service.ServiceConfigBuilder;
-import org.apache.geronimo.deployment.service.GBeanBuilder;
-import org.apache.geronimo.deployment.xbeans.ModuleDocument;
-import org.apache.geronimo.deployment.xbeans.ModuleType;
-import org.apache.geronimo.deployment.NamespaceDrivenBuilder;
-import org.apache.geronimo.deployment.ModuleIDBuilder;
 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.service.ServiceConfigBuilder;
 import org.apache.geronimo.kernel.Jsr77Naming;
 import org.apache.geronimo.kernel.config.ConfigurationAlreadyExistsException;
 import org.apache.geronimo.kernel.config.ConfigurationData;
@@ -37,12 +35,12 @@
 import org.apache.geronimo.kernel.config.NullConfigurationStore;
 import org.apache.geronimo.kernel.repository.Artifact;
 import org.apache.geronimo.kernel.repository.ArtifactManager;
-import org.apache.geronimo.kernel.repository.DefaultArtifactManager;
 import org.apache.geronimo.kernel.repository.ArtifactResolver;
+import org.apache.geronimo.kernel.repository.DefaultArtifactManager;
 import org.apache.geronimo.kernel.repository.DefaultArtifactResolver;
 import org.apache.geronimo.kernel.repository.Repository;
-import org.apache.geronimo.system.configuration.ExecutableConfigurationUtil;
 import org.apache.geronimo.system.configuration.DependencyManager;
+import org.apache.geronimo.system.configuration.ExecutableConfigurationUtil;
 import org.apache.geronimo.system.repository.Maven2Repository;
 import org.osgi.framework.BundleContext;
 
@@ -93,7 +91,13 @@
         ServiceConfigBuilder builder = new ServiceConfigBuilder(null, Collections.<Repository>singleton(repository), Collections.<NamespaceDrivenBuilder>singleton(gBeanBuilder), new Jsr77Naming(), bundleContext);
         ConfigurationStore targetConfigurationStore = new NullConfigurationStore() {
             public File createNewConfigurationDir(Artifact configId) throws ConfigurationAlreadyExistsException {
-                return buildDir;
+                StringBuilder configurationPathBuilder = new StringBuilder("repository");
+                configurationPathBuilder.append(File.separator).append(configId.getGroupId().replace('.', '/'));
+                configurationPathBuilder.append(File.separator).append(configId.getArtifactId());
+                configurationPathBuilder.append(File.separator).append(configId.getVersion());
+                File configurationDir = new File(buildDir, configurationPathBuilder.toString());
+                configurationDir.mkdirs();
+                return configurationDir;
             }
         };
 

Modified: geronimo/server/trunk/framework/buildsupport/car-maven-plugin/src/main/resources/META-INF/plexus/components.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/buildsupport/car-maven-plugin/src/main/resources/META-INF/plexus/components.xml?rev=900657&r1=900656&r2=900657&view=diff
==============================================================================
--- geronimo/server/trunk/framework/buildsupport/car-maven-plugin/src/main/resources/META-INF/plexus/components.xml (original)
+++ geronimo/server/trunk/framework/buildsupport/car-maven-plugin/src/main/resources/META-INF/plexus/components.xml Tue Jan 19 03:39:45 2010
@@ -22,7 +22,12 @@
 
 <component-set>
     <components>
-        
+        <component>
+            <role>org.codehaus.plexus.archiver.UnArchiver</role>
+            <role-hint>car</role-hint>           
+            <implementation>org.codehaus.plexus.archiver.zip.ZipUnArchiver</implementation>
+            <instantiation-strategy>per-lookup</instantiation-strategy>
+        </component>
         <!--
         Deprecated, use geronimo-module instead.
         -->

Modified: geronimo/server/trunk/framework/modules/geronimo-deploy-tool/src/main/java/org/apache/geronimo/deployment/cli/CommandDeploy.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-deploy-tool/src/main/java/org/apache/geronimo/deployment/cli/CommandDeploy.java?rev=900657&r1=900656&r2=900657&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-deploy-tool/src/main/java/org/apache/geronimo/deployment/cli/CommandDeploy.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-deploy-tool/src/main/java/org/apache/geronimo/deployment/cli/CommandDeploy.java Tue Jan 19 03:39:45 2010
@@ -18,7 +18,6 @@
 package org.apache.geronimo.deployment.cli;
 
 import java.io.File;
-import java.io.PrintWriter;
 
 import javax.enterprise.deploy.spi.DeploymentManager;
 import javax.enterprise.deploy.spi.Target;

Modified: geronimo/server/trunk/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/CopyResourceContext.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/CopyResourceContext.java?rev=900657&r1=900656&r2=900657&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/CopyResourceContext.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/CopyResourceContext.java Tue Jan 19 03:39:45 2010
@@ -35,16 +35,15 @@
 
 class CopyResourceContext implements ResourceContext {
     private final DeploymentContext deploymentContext;
-    private final URI baseUri;
     private final byte[] buffer = new byte[4096];
+    private File baseDir;
 
     public CopyResourceContext(DeploymentContext deploymentContext, File baseDir) throws DeploymentException {
         this.deploymentContext = deploymentContext;
-        baseUri = baseDir.toURI();
-
         if (baseDir.isFile()) {
             deploymentContext.addToClassPath("");
         }
+        this.baseDir = baseDir;
     }
 
     /**
@@ -157,7 +156,7 @@
         if (targetPath == null) throw new NullPointerException("targetPath is null");
         if (targetPath.isAbsolute()) throw new IllegalArgumentException("targetPath is absolute");
         if (targetPath.isOpaque()) throw new IllegalArgumentException("targetPath is opaque");
-        return new File(baseUri.resolve(targetPath));
+        return new File(baseDir, targetPath.toString());
     }
 
     public void flush() throws IOException {

Modified: geronimo/server/trunk/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/DeploymentContext.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/DeploymentContext.java?rev=900657&r1=900656&r2=900657&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/DeploymentContext.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/DeploymentContext.java Tue Jan 19 03:39:45 2010
@@ -18,11 +18,11 @@
 package org.apache.geronimo.deployment;
 
 import java.io.File;
-import java.io.IOException;
+import java.io.FileOutputStream;
 import java.io.FileWriter;
-import java.io.PrintWriter;
+import java.io.IOException;
 import java.io.OutputStream;
-import java.io.FileOutputStream;
+import java.io.PrintWriter;
 import java.net.URI;
 import java.net.URISyntaxException;
 import java.net.URL;
@@ -43,41 +43,44 @@
 
 import javax.xml.bind.JAXBException;
 import javax.xml.stream.XMLStreamException;
+
 import org.apache.geronimo.common.DeploymentException;
 import org.apache.geronimo.gbean.AbstractName;
 import org.apache.geronimo.gbean.AbstractNameQuery;
+import org.apache.geronimo.gbean.GAttributeInfo;
 import org.apache.geronimo.gbean.GBeanData;
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GReferenceInfo;
 import org.apache.geronimo.gbean.ReferencePatterns;
-import org.apache.geronimo.gbean.GAttributeInfo;
 import org.apache.geronimo.kernel.GBeanAlreadyExistsException;
 import org.apache.geronimo.kernel.GBeanNotFoundException;
 import org.apache.geronimo.kernel.Naming;
-import org.apache.geronimo.kernel.osgi.BundleUtils;
-import org.apache.geronimo.kernel.osgi.ConfigurationActivator;
 import org.apache.geronimo.kernel.config.Configuration;
 import org.apache.geronimo.kernel.config.ConfigurationData;
 import org.apache.geronimo.kernel.config.ConfigurationManager;
 import org.apache.geronimo.kernel.config.ConfigurationModuleType;
-import org.apache.geronimo.kernel.config.NoSuchConfigException;
 import org.apache.geronimo.kernel.config.Manifest;
 import org.apache.geronimo.kernel.config.ManifestException;
+import org.apache.geronimo.kernel.config.NoSuchConfigException;
+import org.apache.geronimo.kernel.osgi.BundleUtils;
+import org.apache.geronimo.kernel.osgi.ConfigurationActivator;
 import org.apache.geronimo.kernel.repository.Artifact;
+import org.apache.geronimo.kernel.repository.Dependency;
 import org.apache.geronimo.kernel.repository.Environment;
 import org.apache.geronimo.kernel.repository.Repository;
-import org.apache.geronimo.kernel.repository.Dependency;
-import org.apache.geronimo.system.plugin.model.PluginType;
-import org.apache.geronimo.system.plugin.model.PluginArtifactType;
+import org.apache.geronimo.kernel.util.FileUtils;
+import org.apache.geronimo.kernel.util.JarUtils;
 import org.apache.geronimo.system.plugin.model.ArtifactType;
 import org.apache.geronimo.system.plugin.model.DependencyType;
+import org.apache.geronimo.system.plugin.model.PluginArtifactType;
+import org.apache.geronimo.system.plugin.model.PluginType;
 import org.apache.geronimo.system.plugin.model.PluginXmlUtil;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleContext;
-import org.osgi.framework.Constants;
 import org.osgi.framework.BundleException;
+import org.osgi.framework.Constants;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * @version $Rev:385232 $ $Date$
@@ -129,6 +132,7 @@
     private Configuration configuration;
     //TODO OSGI set this
     private boolean boot;
+    private Bundle tempBundle;
 
 
     public DeploymentContext(File baseDir, File inPlaceConfigurationDir, Environment environment, AbstractName moduleName, ConfigurationModuleType moduleType, Naming naming, ConfigurationManager configurationManager, Collection<Repository> repositories, BundleContext bundleContext) throws DeploymentException {
@@ -204,15 +208,16 @@
 //                    urls.toArray(new URL[urls.size()]),
 //                    parents.toArray(new Bundle[parents.size()]),
 //                    classLoadingRules);
-
+            File tempBundleFile = FileUtils.createTempFile();
             createTempManifest();
             createTempPluginMetadata();
-            String location = "reference:file:" + baseDir.getAbsolutePath();
-            Bundle bundle = this.bundleContext.installBundle(location);
-            if (BundleUtils.canStart(bundle)) {
-                bundle.start(Bundle.START_TRANSIENT);
+            JarUtils.jarDirectory(baseDir, tempBundleFile);
+            String location = "reference:file:" + tempBundleFile.getAbsolutePath();
+            tempBundle = bundleContext.installBundle(location);
+            if (BundleUtils.canStart(tempBundle)) {
+                tempBundle.start(Bundle.START_TRANSIENT);
             }
-            configurationData.setBundleContext(bundle.getBundleContext());
+            configurationData.setBundleContext(tempBundle.getBundleContext());
             configurationManager.loadConfiguration(configurationData);
             return configurationManager.getConfiguration(environment.getConfigId());
         } catch (Exception e) {
@@ -362,8 +367,8 @@
     }
 
     public GBeanData getGBeanInstance(AbstractName name) throws GBeanNotFoundException {
-        Map gbeans = configuration.getGBeans();
-        GBeanData gbeanData = (GBeanData) gbeans.get(name);
+        Map<AbstractName, GBeanData> gbeans = configuration.getGBeans();
+        GBeanData gbeanData = gbeans.get(name);
         if (gbeanData == null) {
             throw new GBeanNotFoundException(name);
         }
@@ -764,8 +769,13 @@
             try {
                 //TODO OSGI make sure this unloads the bundle from the framework
                 configurationManager.unloadConfiguration(configuration.getId());
-            } catch (NoSuchConfigException ignored) {
-                //ignore
+            } catch (Exception ignored) {
+            }
+        }
+        if (tempBundle != null) {
+            try {
+                tempBundle.uninstall();
+            } catch (BundleException e) {
             }
         }
     }

Modified: geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/util/FileUtils.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/util/FileUtils.java?rev=900657&r1=900656&r2=900657&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/util/FileUtils.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/util/FileUtils.java Tue Jan 19 03:39:45 2010
@@ -204,7 +204,7 @@
         return rootDeleteStatus;
     }
 
-    public static boolean recursiveDelete2(File root) {
+    public static boolean recursiveDeleteWithRetries(File root) {
         if (root == null) {
             return true;
         }

Modified: geronimo/server/trunk/framework/modules/geronimo-kernel/src/test/java/org/apache/geronimo/kernel/osgi/MockBundleContext.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-kernel/src/test/java/org/apache/geronimo/kernel/osgi/MockBundleContext.java?rev=900657&r1=900656&r2=900657&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-kernel/src/test/java/org/apache/geronimo/kernel/osgi/MockBundleContext.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-kernel/src/test/java/org/apache/geronimo/kernel/osgi/MockBundleContext.java Tue Jan 19 03:39:45 2010
@@ -102,13 +102,7 @@
         MockBundle bundle = new MockBundle(classLoader, location, counter++);
         bundles.put(counter, bundle);
         //activate it.
-        Artifact configId = locations.get(location);
-        if (configId == null) {
-            configId = locations.get(null);
-        }
-        if (configId == null) {
-            configId = Artifact.create(location);
-        }
+        Artifact configId = getArtifactByLocation(location);
         ConfigurationData configurationData = configurationDatas.get(configId);
         if (configurationData == null) {
             configurationData = new ConfigurationData(configId, naming);
@@ -195,6 +189,21 @@
         return null;
     }
 
+    private Artifact getArtifactByLocation(String location) {
+        Artifact configId = locations.get(location);
+        if (configId == null) {
+            configId = locations.get(null);
+        }
+        if (configId == null) {
+            try {
+                configId = Artifact.create(location);
+            } catch (Exception e) {
+                configId = new Artifact("org.apache.geronimo", "testwebapp" + System.currentTimeMillis(), "1.0", "car");
+            }
+        }
+        return configId;
+    }
+
     private class WrappingBundleContext extends MockBundleContext {
 
         private WrappingBundleContext(Bundle bundle) {

Modified: geronimo/server/trunk/framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/service/ServiceConfigBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/service/ServiceConfigBuilder.java?rev=900657&r1=900656&r2=900657&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/service/ServiceConfigBuilder.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/service/ServiceConfigBuilder.java Tue Jan 19 03:39:45 2010
@@ -221,9 +221,8 @@
         if(!environment.getConfigId().isResolved()) {
             throw new IllegalStateException("Module ID should be fully resolved by now (not "+environment.getConfigId()+")");
         }
-        File outfile;
         try {
-            outfile = targetConfigurationStore.createNewConfigurationDir(configId);
+            targetConfigurationStore.createNewConfigurationDir(configId);
         } catch (ConfigurationAlreadyExistsException e) {
             throw new DeploymentException(e);
         }
@@ -236,7 +235,8 @@
             }
 
             AbstractName moduleName = naming.createRootName(configId, configId.toString(), SERVICE_MODULE);
-            context = new DeploymentContext(outfile,
+            File tempDirectory = FileUtils.createTempDir();
+            context = new DeploymentContext(tempDirectory,
                     inPlaceDeployment && null != jar ? JarUtils.toFile(jar) : null,
                     environment,
                     moduleName,
@@ -252,33 +252,26 @@
             serviceBuilders.build(moduleType, context, context);
             return context;
         } catch (DeploymentException de) {
-            cleanupAfterFailedBuild(context, outfile);
+            cleanupContext(context);
             throw de;
         } catch (IOException ie) {
-            cleanupAfterFailedBuild(context, outfile);
+            cleanupContext(context);
             throw ie;
         } catch (RuntimeException re) {
-            cleanupAfterFailedBuild(context, outfile);
+            cleanupContext(context);
             throw re;
         } catch (Error e) {
-            cleanupAfterFailedBuild(context, outfile);
+            cleanupContext(context);
             throw e;
         }
     }
 
-    private void cleanupAfterFailedBuild(DeploymentContext context, File directory) {
-        try {
-            if (context !=null) {
+    private void cleanupContext(DeploymentContext context) {
+        if (context != null) {
+            try {
                 context.close();
+            } catch (Exception e) {
             }
-        } catch (DeploymentException de) {
-            // ignore error on cleanup
-        } catch (IOException ioe) {
-            // ignore error on cleanu
-        }
-        if (directory != null) {
-            FileUtils.recursiveDelete(directory);
         }
     }
-
 }

Modified: geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/configuration/RepositoryConfigurationStore.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/configuration/RepositoryConfigurationStore.java?rev=900657&r1=900656&r2=900657&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/configuration/RepositoryConfigurationStore.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/configuration/RepositoryConfigurationStore.java Tue Jan 19 03:39:45 2010
@@ -196,40 +196,21 @@
     }
 
     public File createNewConfigurationDir(Artifact configId) throws ConfigurationAlreadyExistsException {
-        if(!configId.isResolved()) {
-            throw new IllegalArgumentException("Artifact "+configId+" is not fully resolved");
+        if (!configId.isResolved()) {
+            throw new IllegalArgumentException("Artifact " + configId + " is not fully resolved");
         }
         File location = repository.getLocation(configId);
         if (location.exists()) {
-            boolean isEmptyDirectory = false;
-            if (location.isDirectory()) {
-                File[] files = location.listFiles();
-                isEmptyDirectory = files.length < 1;
-                if (!isEmptyDirectory && log.isDebugEnabled()) {
-                    log.debug(location.getPath() + " has " + files.length + " files:");
-                    for (File file : files) {
-                        log.debug(file.getPath());
-                    }
-                }
-            }
-            if (isEmptyDirectory) {
-                if (log.isDebugEnabled()) {
-                    log.debug(location.getPath() + " is empty");
-                }
-            } else {
-                log.error(location.getPath() + " is not an empty directory");
-                throw new ConfigurationAlreadyExistsException("Configuration already exists: " + configId);
-            }
-        } else {
+            throw new ConfigurationAlreadyExistsException("Configuration already exists: " + configId);
+        }
+        File parentDirectory = location.getParentFile();
+        if (!parentDirectory.exists()) {
+            parentDirectory.mkdirs();
             if (log.isDebugEnabled()) {
-                log.debug("Creating configuration directory: " + location.getPath());
+                log.debug("Configuration directory: " + parentDirectory + " is created");
             }
-            location.mkdirs();
-        }
-        if (!location.exists()) {
-            throw new ConfigurationAlreadyExistsException("Could not create configuration directory: " + location);
         }
-        return location;
+        return parentDirectory;
     }
 
     public Set<URL> resolve(Artifact configId, String moduleName, String path) throws NoSuchConfigException, MalformedURLException {
@@ -344,12 +325,22 @@
         } else if (!source.canRead()) {
             throw new InvalidConfigException("Source is not readable " + source);
         }
+        ExecutableConfigurationUtil.writeConfiguration(configurationData, source);
+        // write in-place configuration config file, if need be.
+        inPlaceConfUtil.writeInPlaceLocation(configurationData, source);
 
         // determine the target location
         Artifact configId = configurationData.getId();
         File destination = repository.getLocation(configId);
-
+        if (!source.equals(destination)) {
+            if (source.isFile()) {
+                repository.copyToRepository(source, configId, null);
+            } else {
+                JarUtils.jarDirectory(source, destination);
+            }
+        }
         // if directory in the correct place -- noop
+       /*
         if (!source.equals(destination)) {
             if (destination.exists()) {
                 throw new ConfigurationAlreadyExistsException(configId.toString());
@@ -366,11 +357,7 @@
                 throw new InvalidConfigException("Unable to install configuration from " + source);
             }
         }
-
-        ExecutableConfigurationUtil.writeConfiguration(configurationData, destination);
-
-        // write in-place configuration config file, if need be.
-        inPlaceConfUtil.writeInPlaceLocation(configurationData, destination);
+    */
     }
 
     public void uninstall(Artifact configId) throws NoSuchConfigException, IOException {

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=900657&r1=900656&r2=900657&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 Tue Jan 19 03:39:45 2010
@@ -557,10 +557,9 @@
         EARContext earContext = null;
         ConfigurationModuleType applicationType = applicationInfo.getType();
         applicationInfo.getEnvironment().setConfigId(configId);
-        File configurationDir = null;
         try {
             try {
-                configurationDir = targetConfigurationStore.createNewConfigurationDir(configId);
+                targetConfigurationStore.createNewConfigurationDir(configId);
             } catch (ConfigurationAlreadyExistsException e) {
                 throw new DeploymentException(e);
             }
@@ -569,9 +568,10 @@
             if (configurationManager == null) {
                 configurationManager = new SimpleConfigurationManager(configurationStores, artifactResolver, repositories, bundleContext);
             }
-
+            //Use a temporary folder to hold the extracted files for analysis use
+            File tempDirectory = FileUtils.createTempDir();
             // Create the output ear context
-            earContext = new EARContext(configurationDir,
+            earContext = new EARContext(tempDirectory,
                     inPlaceDeployment ? JarUtils.toFile(earFile) : null,
                     applicationInfo.getEnvironment(),
                     applicationType,
@@ -714,19 +714,19 @@
             // it's the caller's responsibility to close the context...
             return earContext;
         } catch (GBeanAlreadyExistsException e) {
-            cleanupContext(earContext, configurationDir);
+            cleanupContext(earContext);
             throw new DeploymentException(e);
         } catch (IOException e) {
-            cleanupContext(earContext, configurationDir);
+            cleanupContext(earContext);
             throw e;
         } catch (DeploymentException e) {
-            cleanupContext(earContext, configurationDir);
+            cleanupContext(earContext);
             throw e;
         } catch (RuntimeException e) {
-            cleanupContext(earContext, configurationDir);
+            cleanupContext(earContext);
             throw e;
         } catch (Error e) {
-            cleanupContext(earContext, configurationDir);
+            cleanupContext(earContext);
             throw e;
         } finally {
             for (Object module1 : applicationInfo.getModules()) {
@@ -769,6 +769,15 @@
         }
     }
 
+    private void cleanupContext(EARContext earContext) {
+        if (earContext != null) {
+            try {
+                earContext.close();
+            } catch (Exception e) {
+            }
+        }
+    }
+
     private boolean cleanupConfigurationDir(File configurationDir) {
         LinkedList<String> cannotBeDeletedList = new LinkedList<String>();
 

Modified: geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/GeronimoStandardContext.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/GeronimoStandardContext.java?rev=900657&r1=900656&r2=900657&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/GeronimoStandardContext.java (original)
+++ geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/GeronimoStandardContext.java Tue Jan 19 03:39:45 2010
@@ -141,7 +141,7 @@
 
             // save the role designates for mapping servlets to their run-as roles
             runAsSource = securityHolder.getRunAsSource();
-            
+
             if (securityHolder.getPolicyContextID() != null) {
 
                 policyContextId = securityHolder.getPolicyContextID();
@@ -159,7 +159,7 @@
 
             }
         }
-        
+
         //Set a UserTransactionBeforeAfter
         interceptor = new UserTransactionBeforeAfter(interceptor, index++, ctx.getUserTransaction());
 
@@ -167,7 +167,7 @@
         if (null != clusteredValve) {
             addValve(clusteredValve);
         }
-        
+
         //Set the BeforeAfters as a valve
         GeronimoBeforeAfterValve geronimoBAValve = new GeronimoBeforeAfterValve(interceptor, index);
         addValve(geronimoBAValve);
@@ -186,7 +186,7 @@
                 addValve((Valve)valve);
             }
         }
-        
+
         // Add User Defined Listeners
         List listenerChain = ctx.getLifecycleListenerChain();
         if (listenerChain != null) {
@@ -216,7 +216,7 @@
 
         //Set the Dispatch listener
         this.addInstanceListener(DispatchListener.class.getName());
-        
+
         //Set the run-as listener. listeners must be added before start() is called
         if (runAsSource != null) {
             this.addInstanceListener(RunAsInstanceListener.class.getName());
@@ -288,12 +288,12 @@
      */
     public void backgroundProcess() {
         Object context[] = null;
-        
+
         if (beforeAfter != null){
             context = new Object[contextCount];
             beforeAfter.before(context, null, null, BeforeAfter.EDGE_SERVLET);
         }
-        
+
         try {
             super.backgroundProcess();
         } finally {
@@ -302,15 +302,15 @@
             }
         }
     }
-    
+
     public void kill() throws Exception {
         Object context[] = null;
-        
+
         if (beforeAfter != null){
             context = new Object[contextCount];
             beforeAfter.before(context, null, null, BeforeAfter.EDGE_SERVLET);
         }
-        
+
         try {
             stop();
             destroy();
@@ -326,7 +326,7 @@
         super.init();
         setDocBase(docBase);
     }
-    
+
     public synchronized void start() throws LifecycleException {
         if (pipelineInitialized) {
             try {
@@ -347,7 +347,7 @@
                     // optimization
                     this.removeInstanceListener(RunAsInstanceListener.class.getName());
                 }
-                
+
             } catch (IOException e) {
                 if (e.getCause() instanceof LifecycleException) {
                     throw (LifecycleException) e.getCause();
@@ -415,7 +415,7 @@
             }
 
             public ClassLoader getClassLoader() {
-                // Implementation Note: the actual CL to be used by this 
+                // Implementation Note: the actual CL to be used by this
                 // context is the Geronimo one and not the Tomcat one.
                 return parentClassLoader;
             }
@@ -507,7 +507,7 @@
      * @return true if at least one servlet specifies a run-as role, false otherwise
      */
     protected boolean hasRunAsServlet() {
-        for (Container servlet : findChildren()) { 
+        for (Container servlet : findChildren()) {
             if (servlet instanceof Wrapper) {
                 if (((Wrapper)servlet).getRunAs() != null) {
                     return true;
@@ -516,11 +516,11 @@
         }
         return false;
     }
-    
+
     /**
      * Get the Subject for the servlet's run-as role
      * @param runAsRole Name of run as role to get Subject for
-     * @return Subject for the servlet's run-as role, if specified.  otherwise null. 
+     * @return Subject for the servlet's run-as role, if specified.  otherwise null.
      */
     public Subject getSubjectForRole(String runAsRole) {
         return runAsSource.getSubjectForRole(runAsRole);

Modified: geronimo/server/trunk/plugins/welcome/geronimo-welcome/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/welcome/geronimo-welcome/pom.xml?rev=900657&r1=900656&r2=900657&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/welcome/geronimo-welcome/pom.xml (original)
+++ geronimo/server/trunk/plugins/welcome/geronimo-welcome/pom.xml Tue Jan 19 03:39:45 2010
@@ -14,9 +14,9 @@
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
--->
 
-<!-- $Rev$ $Date$ -->
+-->
+ <!--$Rev$ $Date$ -->
 
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
 
@@ -59,22 +59,22 @@
         </dependency>
     </dependencies>
 
-    <!--<build>-->
-        <!--<plugins>-->
-            <!--<plugin>-->
-                <!--<groupId>org.codehaus.mojo.jspc</groupId>-->
-                <!--<artifactId>jspc-maven-plugin</artifactId>-->
-            <!--</plugin>-->
-
-            <!--<plugin>-->
-                <!--<groupId>org.apache.maven.plugins</groupId>-->
-                <!--<artifactId>maven-war-plugin</artifactId>-->
-                <!--<configuration>-->
-                    <!--<webXml>${project.build.directory}/jspweb.xml</webXml>-->
-                    <!--<warSourceExcludes>**/*.jsp</warSourceExcludes>-->
-                <!--</configuration>-->
-            <!--</plugin>-->
-        <!--</plugins>-->
-    <!--</build>-->
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.codehaus.mojo.jspc</groupId>
+                <artifactId>jspc-maven-plugin</artifactId>
+            </plugin>
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-war-plugin</artifactId>
+                <configuration>
+                    <webXml>${project.build.directory}/jspweb.xml</webXml>
+                    <warSourceExcludes>**/*.jsp</warSourceExcludes>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
 
 </project>

Modified: geronimo/server/trunk/plugins/welcome/welcome-tomcat-server/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/welcome/welcome-tomcat-server/pom.xml?rev=900657&r1=900656&r2=900657&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/welcome/welcome-tomcat-server/pom.xml (original)
+++ geronimo/server/trunk/plugins/welcome/welcome-tomcat-server/pom.xml Tue Jan 19 03:39:45 2010
@@ -72,6 +72,73 @@
           <version>${version}</version>
           <type>car</type>
       </dependency>
+      <dependency>
+            <groupId>org.apache.geronimo.framework</groupId>
+            <artifactId>online-deployer</artifactId>
+            <version>${version}</version>
+            <type>car</type>
+        </dependency>
+        <!--dependency>
+            <groupId>org.apache.geronimo.framework</groupId>
+            <artifactId>offline-deployer</artifactId>
+            <version>${version}</version>
+            <type>car</type>
+        </dependency-->
+        <!--dependency>
+            <groupId>org.apache.geronimo.configs</groupId>
+            <artifactId>hot-deployer</artifactId>
+            <version>${version}</version>
+            <type>car</type>
+        </dependency-->
+        <dependency>
+            <groupId>org.apache.geronimo.configs</groupId>
+            <artifactId>jsr88-ear-configurer</artifactId>
+            <version>${version}</version>
+            <type>car</type>
+        </dependency>
+        <!--dependency>
+            <groupId>org.apache.geronimo.configs</groupId>
+            <artifactId>jsr88-rar-configurer</artifactId>
+            <version>${version}</version>
+            <type>car</type>
+        </dependency-->
+        <dependency>
+            <groupId>org.apache.geronimo.configs</groupId>
+            <artifactId>jsr88-war-configurer</artifactId>
+            <version>${version}</version>
+            <type>car</type>
+        </dependency>
+        <!--dependency>
+            <groupId>org.apache.geronimo.configs</groupId>
+            <artifactId>remote-deploy-tomcat</artifactId>
+            <version>${version}</version>
+            <type>car</type>
+        </dependency-->
+
+        <!--dependency>
+            <groupId>org.apache.geronimo.framework</groupId>
+            <artifactId>gshell-geronimo</artifactId>
+            <version>${version}</version>
+            <type>car</type>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.framework</groupId>
+            <artifactId>gshell-remote</artifactId>
+            <version>${version}</version>
+            <type>car</type>
+        </dependency-->
+        <dependency>
+            <groupId>org.apache.geronimo.configs</groupId>
+            <artifactId>tomcat7-deployer</artifactId>
+            <version>${version}</version>
+            <type>car</type>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.configs</groupId>
+            <artifactId>jasper-deployer</artifactId>
+            <version>${version}</version>
+            <type>car</type>
+        </dependency>
   </dependencies>
   <properties>
     <geronimoVersion>3.0-SNAPSHOT</geronimoVersion>

Modified: geronimo/server/trunk/plugins/welcome/welcome-tomcat/src/main/history/dependencies.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/welcome/welcome-tomcat/src/main/history/dependencies.xml?rev=900657&r1=900656&r2=900657&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/welcome/welcome-tomcat/src/main/history/dependencies.xml (original)
+++ geronimo/server/trunk/plugins/welcome/welcome-tomcat/src/main/history/dependencies.xml Tue Jan 19 03:39:45 2010
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<plugin-artifact xmlns:ns2="http://geronimo.apache.org/xml/ns/attributes-1.2" xmlns="http://geronimo.apache.org/xml/ns/plugins-1.3">
+<plugin-artifact xmlns="http://geronimo.apache.org/xml/ns/plugins-1.3" xmlns:ns2="http://geronimo.apache.org/xml/ns/attributes-1.2">
     <module-id>
         <groupId>org.apache.geronimo.configs</groupId>
         <artifactId>welcome-tomcat</artifactId>