geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r439189 - in /geronimo/server/trunk/modules/geronimo-j2ee-builder: ./ src/test/java/org/apache/geronimo/j2ee/deployment/
Date Fri, 01 Sep 2006 05:32:37 GMT
Author: jdillon
Date: Thu Aug 31 22:32:37 2006
New Revision: 439189

URL: http://svn.apache.org/viewvc?rev=439189&view=rev
Log:
(GERONIMO-2352) Hook up semi-unpacked deployments

Added:
    geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder14NakedUnpackedTest.java
  (with props)
    geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder14UnpackedTest.java
  (with props)
Modified:
    geronimo/server/trunk/modules/geronimo-j2ee-builder/pom.xml
    geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilderTestSupport.java

Modified: geronimo/server/trunk/modules/geronimo-j2ee-builder/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-j2ee-builder/pom.xml?rev=439189&r1=439188&r2=439189&view=diff
==============================================================================
--- geronimo/server/trunk/modules/geronimo-j2ee-builder/pom.xml (original)
+++ geronimo/server/trunk/modules/geronimo-j2ee-builder/pom.xml Thu Aug 31 22:32:37 2006
@@ -60,6 +60,7 @@
                 <artifactId>dependency-maven-plugin</artifactId>
                 <executions>
                     <execution>
+                        <id>copy-test-deployments</id>
                         <phase>generate-test-resources</phase>
                         <goals>
                             <goal>copy</goal>
@@ -114,6 +115,25 @@
             <plugin>
                 <artifactId>maven-antrun-plugin</artifactId>
                 <executions>
+                    <execution>
+                        <id>unpack-test-deployments</id>
+                        <phase>generate-test-resources</phase>
+                        <goals>
+                            <goal>run</goal>
+                        </goals>
+                        <configuration>
+                            <tasks>
+                                <mkdir dir="${project.build.directory}/test-ear-j2ee_1.4-unpacked.ear"/>
+                                <unzip src="${project.build.directory}/test-ear-j2ee_1.4.ear"
+                                    dest="${project.build.directory}/test-ear-j2ee_1.4-unpacked.ear"/>
+                                
+                                <mkdir dir="${project.build.directory}/test-ear-j2ee_1.4-naked-unpacked.ear"/>
+                                <unzip src="${project.build.directory}/test-ear-j2ee_1.4-naked.ear"
+                                    dest="${project.build.directory}/test-ear-j2ee_1.4-naked-unpacked.ear"/>
+                            </tasks>
+                        </configuration>
+                    </execution>
+                    
                     <!--
                     HACK: Copy the generated XmlBeans bits for clover
                     -->

Added: geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder14NakedUnpackedTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder14NakedUnpackedTest.java?rev=439189&view=auto
==============================================================================
--- geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder14NakedUnpackedTest.java
(added)
+++ geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder14NakedUnpackedTest.java
Thu Aug 31 22:32:37 2006
@@ -0,0 +1,87 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, 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.
+ */
+
+package org.apache.geronimo.j2ee.deployment;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URI;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.jar.JarFile;
+
+import javax.xml.namespace.QName;
+
+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.config.ConfigurationData;
+import org.apache.geronimo.kernel.config.IOUtil;
+import org.apache.geronimo.kernel.config.InvalidConfigException;
+import org.apache.geronimo.kernel.config.NoSuchConfigException;
+import org.apache.geronimo.kernel.config.NullConfigurationStore;
+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.repository.ArtifactManager;
+import org.apache.geronimo.kernel.repository.DefaultArtifactManager;
+import org.apache.geronimo.kernel.repository.ArtifactResolver;
+import org.apache.geronimo.kernel.repository.DefaultArtifactResolver;
+
+import org.apache.geronimo.testsupport.TestSupport;
+
+/**
+ * EAR config builder tests for J2EE 1.4.
+ *
+ * @version $Rev:386276 $ $Date$
+ */
+public class EARConfigBuilder14NakedUnpackedTest
+    extends EARConfigBuilderTestSupport
+{
+    protected void setUp() throws Exception {
+        super.setUp();
+        
+        earFile = DeploymentUtil.createJarFile(resolveFile("target/test-ear-j2ee_1.4-naked-unpacked.ear"));
+        ejbConfigBuilder.ejbModule = new EJBModule(false, ejbModuleName, null, null, "ejb.jar/",
null, null, null);
+        webConfigBuilder.contextRoot = contextRoot;
+        webConfigBuilder.webModule = new WebModule(false, webModuleName, null, null, "war.war/",
null, null, null, contextRoot, portMap, WEB_NAMESPACE);
+        connectorConfigBuilder.connectorModule = new ConnectorModule(false, raModuleName,
null, null, "rar.rar", null, null, null);
+    }
+
+    protected void tearDown() throws Exception {
+        DeploymentUtil.close(earFile);
+        close(ejbConfigBuilder.ejbModule);
+        close(webConfigBuilder.webModule);
+        close(connectorConfigBuilder.connectorModule);
+        
+        super.tearDown();
+    }
+}

Propchange: geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder14NakedUnpackedTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder14NakedUnpackedTest.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder14NakedUnpackedTest.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder14UnpackedTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder14UnpackedTest.java?rev=439189&view=auto
==============================================================================
--- geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder14UnpackedTest.java
(added)
+++ geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder14UnpackedTest.java
Thu Aug 31 22:32:37 2006
@@ -0,0 +1,87 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, 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.
+ */
+
+package org.apache.geronimo.j2ee.deployment;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URI;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.jar.JarFile;
+
+import javax.xml.namespace.QName;
+
+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.config.ConfigurationData;
+import org.apache.geronimo.kernel.config.IOUtil;
+import org.apache.geronimo.kernel.config.InvalidConfigException;
+import org.apache.geronimo.kernel.config.NoSuchConfigException;
+import org.apache.geronimo.kernel.config.NullConfigurationStore;
+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.repository.ArtifactManager;
+import org.apache.geronimo.kernel.repository.DefaultArtifactManager;
+import org.apache.geronimo.kernel.repository.ArtifactResolver;
+import org.apache.geronimo.kernel.repository.DefaultArtifactResolver;
+
+import org.apache.geronimo.testsupport.TestSupport;
+
+/**
+ * EAR config builder tests for J2EE 1.4.
+ *
+ * @version $Rev:386276 $ $Date$
+ */
+public class EARConfigBuilder14UnpackedTest
+    extends EARConfigBuilderTestSupport
+{
+    protected void setUp() throws Exception {                     
+        super.setUp();
+        
+        earFile = DeploymentUtil.createJarFile(resolveFile("target/test-ear-j2ee_1.4-unpacked.ear"));
+        ejbConfigBuilder.ejbModule = new EJBModule(false, ejbModuleName, null, null, "ejb.jar/",
null, null, null);
+        webConfigBuilder.contextRoot = contextRoot;
+        webConfigBuilder.webModule = new WebModule(false, webModuleName, null, null, "war.war/",
null, null, null, contextRoot, portMap, WEB_NAMESPACE);
+        connectorConfigBuilder.connectorModule = new ConnectorModule(false, raModuleName,
null, null, "rar.rar/", null, null, null);
+    }
+
+    protected void tearDown() throws Exception {
+        DeploymentUtil.close(earFile);
+        close(ejbConfigBuilder.ejbModule);
+        close(webConfigBuilder.webModule);
+        close(connectorConfigBuilder.connectorModule);
+        
+        super.tearDown();
+    }
+}

Propchange: geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder14UnpackedTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder14UnpackedTest.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder14UnpackedTest.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilderTestSupport.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilderTestSupport.java?rev=439189&r1=439188&r2=439189&view=diff
==============================================================================
--- geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilderTestSupport.java
(original)
+++ geronimo/server/trunk/modules/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilderTestSupport.java
Thu Aug 31 22:32:37 2006
@@ -143,40 +143,6 @@
     
     TODO: Hook up these tests...
     
-    TestSetup setupUnpacked = new TestSetup(inner) {
-        protected void setUp() throws Exception {
-            earFile = DeploymentUtil.createJarFile(new File(basedir, "target/test-unpacked-ear/full/"));
-            ejbConfigBuilder.ejbModule = new EJBModule(false, ejbModuleName, null, null,
"test-ejb-jar.jar/", null, null, null);
-            webConfigBuilder.contextRoot = contextRoot;
-            webConfigBuilder.webModule = new WebModule(false, webModuleName, null, null,
"test-war.war/", null, null, null, contextRoot, portMap, WEB_NAMESPACE);
-            connectorConfigBuilder.connectorModule = new ConnectorModule(false, raModuleName,
null, null, "test-rar.rar", null, null, null);
-        }
-
-        protected void tearDown() {
-            DeploymentUtil.close(earFile);
-            close(ejbConfigBuilder.ejbModule);
-            close(webConfigBuilder.webModule);
-            close(connectorConfigBuilder.connectorModule);
-        }
-    };
-    
-    TestSetup setupUnpackedNaked = new TestSetup(inner) {
-        protected void setUp() throws Exception {
-            earFile = DeploymentUtil.createJarFile(new File(basedir, "target/test-unpacked-ear/naked/"));
-            ejbConfigBuilder.ejbModule = new EJBModule(false, ejbModuleName, null, null,
"test-ejb-jar.jar/", null, null, null);
-            webConfigBuilder.contextRoot = contextRoot;
-            webConfigBuilder.webModule = new WebModule(false, webModuleName, null, null,
"test-war.war", null, null, null, contextRoot, portMap, WEB_NAMESPACE);
-            connectorConfigBuilder.connectorModule = new ConnectorModule(false, raModuleName,
null, null, "test-rar.rar", null, null, null);
-        }
-
-        protected void tearDown() {
-            DeploymentUtil.close(earFile);
-            close(ejbConfigBuilder.ejbModule);
-            close(webConfigBuilder.webModule);
-            close(connectorConfigBuilder.connectorModule);
-        }
-    };
-    
     TestSetup setupUnpackedAltDD = new TestSetup(inner) {
         protected void setUp() throws Exception {
             earFile = DeploymentUtil.createJarFile(new File(basedir, "target/test-unpacked-ear/alt-dd/"));



Mime
View raw message