geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcco...@apache.org
Subject svn commit: r647891 [1/2] - in /geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test: java/org/apache/geronimo/jee/application/ java/org/apache/geronimo/jee/applicationclient/ java/org/apache/geronimo/jee...
Date Mon, 14 Apr 2008 16:40:56 GMT
Author: mcconne
Date: Mon Apr 14 09:40:39 2008
New Revision: 647891

URL: http://svn.apache.org/viewvc?rev=647891&view=rev
Log:
GERONIMODEVTOOLS-311 Add webapp junit testcases

Added:
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/java/org/apache/geronimo/jee/web/
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/java/org/apache/geronimo/jee/web/GeronimoWebTest.java   (with props)
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/application/geronimo-application-expected-6.xml   (with props)
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/web/
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/web/geronimo-web-example-1.xml   (with props)
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/web/geronimo-web-example-2.xml   (with props)
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/web/geronimo-web-example-3.xml   (with props)
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/web/geronimo-web-example-4.xml   (with props)
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/web/geronimo-web-example-5.xml   (with props)
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/web/geronimo-web-example-6.xml   (with props)
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/web/geronimo-web-expected-1.xml   (with props)
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/web/geronimo-web-expected-2.xml   (with props)
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/web/geronimo-web-expected-3.xml   (with props)
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/web/geronimo-web-expected-4.xml   (with props)
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/web/geronimo-web-expected-5.xml   (with props)
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/web/geronimo-web-expected-6.xml   (with props)
Modified:
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/java/org/apache/geronimo/jee/application/GeronimoApplicationTest.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/java/org/apache/geronimo/jee/applicationclient/GeronimoApplicationClientTest.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/application/geronimo-application-example-1.xml
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/application/geronimo-application-example-2.xml
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/application/geronimo-application-example-3.xml
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/application/geronimo-application-example-4.xml
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/application/geronimo-application-example-5.xml
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/application/geronimo-application-example-6.xml
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/applicationclient/geronimo-application-client-example-2.xml
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/applicationclient/geronimo-application-client-example-3.xml
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/applicationclient/geronimo-application-client-example-5.xml
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/applicationclient/geronimo-application-client-example-6.xml
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/applicationclient/geronimo-application-client-expected-2.xml

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/java/org/apache/geronimo/jee/application/GeronimoApplicationTest.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/java/org/apache/geronimo/jee/application/GeronimoApplicationTest.java?rev=647891&r1=647890&r2=647891&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/java/org/apache/geronimo/jee/application/GeronimoApplicationTest.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/java/org/apache/geronimo/jee/application/GeronimoApplicationTest.java Mon Apr 14 09:40:39 2008
@@ -24,7 +24,6 @@
 import java.io.InputStream;
 
 import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBException;
 import javax.xml.bind.Marshaller;
 import javax.xml.bind.Unmarshaller;
 import javax.xml.parsers.SAXParser;
@@ -34,7 +33,6 @@
 import junit.framework.AssertionFailedError;
 import junit.framework.TestCase;
 
-import org.apache.geronimo.jee.deployment.Module;
 import org.custommonkey.xmlunit.Diff;
 import org.xml.sax.Attributes;
 import org.xml.sax.InputSource;
@@ -63,55 +61,43 @@
  */
 public class GeronimoApplicationTest extends TestCase {
 
-	// 
-	// JAXBContext instantiation is costly - should be done only once
-	// 
-	private static final JAXBContext jaxbContext = newJAXBContext();
-	private static JAXBContext newJAXBContext() {
-		try {
-            return JAXBContext.newInstance(Application.class, 
-                                           Module.class);
-		} catch (JAXBException e) {
-			System.out.println("JAXBException: JAXBContext.newInstance");
-			e.printStackTrace();
-		}
-		return null;
-	}
-
-
-    // 
-    // Testcase(s)
-    // 
+    /*------------------------------------------------------------------------*\
+    |                                                                          |
+    |  Testcase(s)                                                             | 
+    |                                                                          |
+    \*------------------------------------------------------------------------*/
     public void testUnmarshallAndMarshall() throws Exception {
-
         unmarshallAndMarshall("application/geronimo-application-example-1.xml", 
                               "application/geronimo-application-expected-1.xml");
-
         unmarshallAndMarshall("application/geronimo-application-example-2.xml", 
                               "application/geronimo-application-expected-2.xml");
-
         unmarshallAndMarshall("application/geronimo-application-example-3.xml", 
                               "application/geronimo-application-expected-3.xml");
     }
 
     public void testConvertNamespace() throws Exception {
-
         convertNamespace("application/geronimo-application-example-4.xml",
                          "application/geronimo-application-expected-1.xml");
-
         convertNamespace("application/geronimo-application-example-5.xml", 
                          "application/geronimo-application-expected-2.xml");
-
         convertNamespace("application/geronimo-application-example-6.xml", 
-                         "application/geronimo-application-expected-3.xml");
+                         "application/geronimo-application-expected-6.xml");
     }
 
 
+    /*------------------------------------------------------------------------*\
+    |                                                                          |
+    |  Private method(s)                                                       | 
+    |                                                                          |
+    \*------------------------------------------------------------------------*/
     private void unmarshallAndMarshall(String fileExample, String fileExpected) throws Exception {
 
         // 
         // Create unmarshaller and marshaller
         // 
+        JAXBContext jaxbContext = JAXBContext.newInstance( 
+                                    "org.apache.geronimo.jee.application:" +
+                                    "org.apache.geronimo.jee.deployment", getClass().getClassLoader() );
         Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
         Marshaller marshaller = jaxbContext.createMarshaller();
         marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
@@ -149,8 +135,8 @@
             assertTrue("Files are similar " + myDiff, myDiff.similar());
         }
         catch (AssertionFailedError e) {
-            System.out.println("[Example XML] " + '\n' + example + '\n');
-            System.out.println("[Expected XML] " + '\n' + expected + '\n');
+            System.out.println("[Example XML: " + fileExample + "] " + '\n' + example + '\n');
+            System.out.println("[Expected XML: " + fileExpected + "] " + '\n' + expected + '\n');
             System.out.println("[Actual XML] " + '\n' + actual + '\n');
             throw e;            
         }
@@ -163,6 +149,9 @@
         // 
         // Create unmarshaller and marshaller
         // 
+        JAXBContext jaxbContext = JAXBContext.newInstance( 
+                                    "org.apache.geronimo.jee.application:" +
+                                    "org.apache.geronimo.jee.deployment", getClass().getClassLoader() );
         Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
         Marshaller marshaller = jaxbContext.createMarshaller();
         marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
@@ -211,8 +200,8 @@
             assertTrue("Files are similar " + myDiff, myDiff.similar());
         }
         catch (AssertionFailedError e) {
-            System.out.println("[Example XML] " + '\n' + example + '\n');
-            System.out.println("[Expected XML] " + '\n' + expected + '\n');
+            System.out.println("[Example XML: " + fileExample + "] " + '\n' + example + '\n');
+            System.out.println("[Expected XML: " + fileExpected + "] " + '\n' + expected + '\n');
             System.out.println("[Actual XML] " + '\n' + actual + '\n');
             throw e;            
         }
@@ -240,12 +229,31 @@
 
         public void startElement(String uri, String localName, String qname, Attributes atts) throws SAXException {
 
-            if (uri.equals("http://geronimo.apache.org/xml/ns/j2ee/application-1.2")) {
-                uri = "http://geronimo.apache.org/xml/ns/j2ee/application-2.0";
+            if (uri.equals("http://geronimo.apache.org/xml/ns/j2ee/application-client-1.1")) {
+                uri = "http://geronimo.apache.org/xml/ns/j2ee/application-client-2.0";
             }
             else if (uri.equals("http://geronimo.apache.org/xml/ns/deployment-1.1")) {
                 uri = "http://geronimo.apache.org/xml/ns/deployment-1.2";
             }
+            else if (uri.equals("http://geronimo.apache.org/xml/ns/naming-1.1")) {
+                uri = "http://geronimo.apache.org/xml/ns/naming-1.2";
+            }
+            else if (uri.equals("http://geronimo.apache.org/xml/ns/j2ee/application-1.2")) {
+                uri = "http://geronimo.apache.org/xml/ns/j2ee/application-2.0";
+            }
+            else if (uri.equals("http://geronimo.apache.org/xml/ns/security-1.1")) {
+                uri = "http://geronimo.apache.org/xml/ns/security-2.0";
+            }
+            else if (uri.equals("http://geronimo.apache.org/xml/ns/security-1.2")) {
+                uri = "http://geronimo.apache.org/xml/ns/security-2.0";
+            }
+            else if (uri.equals("http://geronimo.apache.org/xml/ns/j2ee/web-2.0")) {
+                uri = "http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1";
+            }
+            else if (uri.equals("http://geronimo.apache.org/xml/ns/j2ee/web-1.1")) {
+                uri = "http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1";
+            }
+
             super.startElement(uri, localName, qname, atts);
         }
     }

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/java/org/apache/geronimo/jee/applicationclient/GeronimoApplicationClientTest.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/java/org/apache/geronimo/jee/applicationclient/GeronimoApplicationClientTest.java?rev=647891&r1=647890&r2=647891&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/java/org/apache/geronimo/jee/applicationclient/GeronimoApplicationClientTest.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/java/org/apache/geronimo/jee/applicationclient/GeronimoApplicationClientTest.java Mon Apr 14 09:40:39 2008
@@ -24,7 +24,6 @@
 import java.io.InputStream;
 
 import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBException;
 import javax.xml.bind.Marshaller;
 import javax.xml.bind.Unmarshaller;
 import javax.xml.parsers.SAXParser;
@@ -34,7 +33,6 @@
 import junit.framework.AssertionFailedError;
 import junit.framework.TestCase;
 
-import org.apache.geronimo.jee.deployment.Module;
 import org.custommonkey.xmlunit.Diff;
 import org.xml.sax.Attributes;
 import org.xml.sax.InputSource;
@@ -63,55 +61,44 @@
  */
 public class GeronimoApplicationClientTest extends TestCase {
 
-	// 
-	// JAXBContext instantiation is costly - should be done only once
-	// 
-	private static final JAXBContext jaxbContext = newJAXBContext();
-	private static JAXBContext newJAXBContext() {
-		try {
-            return JAXBContext.newInstance(ApplicationClient.class,
-                                           Module.class);
-		} catch (JAXBException e) {
-			System.out.println("JAXBException: JAXBContext.newInstance");
-			e.printStackTrace();
-		}
-		return null;
-	}
-
-
-    // 
-    // Testcase(s)
-    // 
+    /*------------------------------------------------------------------------*\
+    |                                                                          |
+    |  Testcase(s)                                                             | 
+    |                                                                          |
+    \*------------------------------------------------------------------------*/
     public void testUnmarshallAndMarshall() throws Exception {
-
         unmarshallAndMarshall("applicationclient/geronimo-application-client-example-1.xml", 
                               "applicationclient/geronimo-application-client-expected-1.xml");
-
         unmarshallAndMarshall("applicationclient/geronimo-application-client-example-2.xml", 
                               "applicationclient/geronimo-application-client-expected-2.xml");
-
         unmarshallAndMarshall("applicationclient/geronimo-application-client-example-3.xml", 
                               "applicationclient/geronimo-application-client-expected-3.xml");
     }
 
     public void testConvertNamespace() throws Exception {
-
         convertNamespace("applicationclient/geronimo-application-client-example-4.xml",
                          "applicationclient/geronimo-application-client-expected-1.xml");
-
         convertNamespace("applicationclient/geronimo-application-client-example-5.xml", 
                          "applicationclient/geronimo-application-client-expected-2.xml");
-
         convertNamespace("applicationclient/geronimo-application-client-example-6.xml", 
                          "applicationclient/geronimo-application-client-expected-3.xml");
     }
 
 
+    /*------------------------------------------------------------------------*\
+    |                                                                          |
+    |  Private method(s)                                                       | 
+    |                                                                          |
+    \*------------------------------------------------------------------------*/
     private void unmarshallAndMarshall(String fileExample, String fileExpected) throws Exception {
 
         // 
         // Create unmarshaller and marshaller
         // 
+        JAXBContext jaxbContext = JAXBContext.newInstance( 
+                                    "org.apache.geronimo.jee.applicationclient:" +
+                                    "org.apache.geronimo.jee.naming:" +
+                                    "org.apache.geronimo.jee.deployment", getClass().getClassLoader() );
         Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
         Marshaller marshaller = jaxbContext.createMarshaller();
         marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
@@ -149,8 +136,8 @@
             assertTrue("Files are similar " + myDiff, myDiff.similar());
         }
         catch (AssertionFailedError e) {
-            System.out.println("[Example XML] " + '\n' + example + '\n');
-            System.out.println("[Expected XML] " + '\n' + expected + '\n');
+            System.out.println("[Example XML: " + fileExample + "] " + '\n' + example + '\n');
+            System.out.println("[Expected XML: " + fileExpected + "] " + '\n' + expected + '\n');
             System.out.println("[Actual XML] " + '\n' + actual + '\n');
             throw e;            
         }
@@ -163,6 +150,10 @@
         // 
         // Create unmarshaller and marshaller
         // 
+        JAXBContext jaxbContext = JAXBContext.newInstance( 
+                                    "org.apache.geronimo.jee.applicationclient:" +
+                                    "org.apache.geronimo.jee.naming:" +
+                                    "org.apache.geronimo.jee.deployment", getClass().getClassLoader() );
         Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
         Marshaller marshaller = jaxbContext.createMarshaller();
         marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
@@ -210,8 +201,8 @@
             Diff myDiff = new Diff(expected, actual);
             assertTrue("Files are similar " + myDiff, myDiff.similar());
         } catch (AssertionFailedError e) {
-            System.out.println("[Example XML] " + '\n' + example + '\n');
-            System.out.println("[Expected XML] " + '\n' + expected + '\n');
+            System.out.println("[Example XML: " + fileExample + "] " + '\n' + example + '\n');
+            System.out.println("[Expected XML: " + fileExpected + "] " + '\n' + expected + '\n');
             System.out.println("[Actual XML] " + '\n' + actual + '\n');
             throw e;            
         }
@@ -244,6 +235,24 @@
             }
             else if (uri.equals("http://geronimo.apache.org/xml/ns/deployment-1.1")) {
                 uri = "http://geronimo.apache.org/xml/ns/deployment-1.2";
+            }
+            else if (uri.equals("http://geronimo.apache.org/xml/ns/naming-1.1")) {
+                uri = "http://geronimo.apache.org/xml/ns/naming-1.2";
+            }
+            else if (uri.equals("http://geronimo.apache.org/xml/ns/j2ee/application-1.2")) {
+                uri = "http://geronimo.apache.org/xml/ns/j2ee/application-2.0";
+            }
+            else if (uri.equals("http://geronimo.apache.org/xml/ns/security-1.1")) {
+                uri = "http://geronimo.apache.org/xml/ns/security-2.0";
+            }
+            else if (uri.equals("http://geronimo.apache.org/xml/ns/security-1.2")) {
+                uri = "http://geronimo.apache.org/xml/ns/security-2.0";
+            }
+            else if (uri.equals("http://geronimo.apache.org/xml/ns/j2ee/web-2.0")) {
+                uri = "http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1";
+            }
+            else if (uri.equals("http://geronimo.apache.org/xml/ns/j2ee/web-1.1")) {
+                uri = "http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1";
             }
 
             super.startElement(uri, localName, qname, atts);

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/java/org/apache/geronimo/jee/web/GeronimoWebTest.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/java/org/apache/geronimo/jee/web/GeronimoWebTest.java?rev=647891&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/java/org/apache/geronimo/jee/web/GeronimoWebTest.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/java/org/apache/geronimo/jee/web/GeronimoWebTest.java Mon Apr 14 09:40:39 2008
@@ -0,0 +1,272 @@
+/*
+ * 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.jee.web;
+
+import java.io.BufferedInputStream;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.Marshaller;
+import javax.xml.bind.Unmarshaller;
+import javax.xml.parsers.SAXParser;
+import javax.xml.parsers.SAXParserFactory;
+import javax.xml.transform.sax.SAXSource;
+
+import junit.framework.AssertionFailedError;
+import junit.framework.TestCase;
+
+import org.custommonkey.xmlunit.Diff;
+import org.xml.sax.Attributes;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+import org.xml.sax.XMLReader;
+import org.xml.sax.helpers.XMLFilterImpl;
+
+/**
+ * <strong>GeronimoWebTest</strong> is used to test various JAXB operations on
+ * the following Geronimo-specific XML file supported by the GEP: 
+ * 
+ * <ul>
+ *      <li>geronimo-web.xml
+ * </ul>
+ * 
+ * <p>The following JAXB operations are performed: 
+ * <ol>
+ *      <li>Unmarshalling and marshalling sequence
+ *      <li>Namespace conversion
+ *      <li>Element conversion (TODO)
+ *      <li>Create a file (TODO)
+ * </ol>
+ * 
+ * 
+ * @version $Rev$ $Date$
+ */
+public class GeronimoWebTest extends TestCase {
+
+    /*------------------------------------------------------------------------*\
+    |                                                                          |
+    |  testcase(s)                                                             | 
+    |                                                                          |
+    \*------------------------------------------------------------------------*/
+    public void testUnmarshallAndMarshall() throws Exception {
+        unmarshallAndMarshall("web/geronimo-web-example-1.xml", 
+                              "web/geronimo-web-expected-1.xml");
+        unmarshallAndMarshall("web/geronimo-web-example-2.xml", 
+                              "web/geronimo-web-expected-2.xml");
+        unmarshallAndMarshall("web/geronimo-web-example-3.xml", 
+                              "web/geronimo-web-expected-3.xml");
+    }
+
+    public void testConvertNamespace() throws Exception {
+        convertNamespace("web/geronimo-web-example-4.xml",
+                         "web/geronimo-web-expected-4.xml");
+        convertNamespace("web/geronimo-web-example-5.xml", 
+                         "web/geronimo-web-expected-5.xml");
+        convertNamespace("web/geronimo-web-example-6.xml", 
+                         "web/geronimo-web-expected-6.xml");
+    }
+
+
+    /*------------------------------------------------------------------------*\
+    |                                                                          |
+    |  Private method(s)                                                       | 
+    |                                                                          |
+    \*------------------------------------------------------------------------*/
+    private void unmarshallAndMarshall(String fileExample, String fileExpected) throws Exception {
+
+        // 
+        // Create unmarshaller and marshaller
+        // 
+        JAXBContext jaxbContext = JAXBContext.newInstance( 
+                                    "org.apache.geronimo.jee.connector:" +
+                                    "org.apache.geronimo.jee.openejb:" +
+                                    "org.apache.geronimo.jee.web:" +
+                                    "org.apache.geronimo.jee.application:" +
+                                    "org.apache.geronimo.jee.applicationclient:" +
+                                    "org.apache.geronimo.jee.deployment:" +
+                                    "org.apache.geronimo.jee.naming:" +
+                                    "org.apache.geronimo.jee.security", getClass().getClassLoader() );
+        Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
+        Marshaller marshaller = jaxbContext.createMarshaller();
+        marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
+        marshaller.setProperty(Marshaller.JAXB_ENCODING, "UTF-8");
+
+        // 
+        // Read example and expected XML files
+        // 
+        InputStream exampleInputStream = this.getClass().getClassLoader().getResourceAsStream(fileExample);
+        InputStream expectedInputStream = this.getClass().getClassLoader().getResourceAsStream(fileExpected);
+        String example = readContent(exampleInputStream);
+        String expected = readContent(expectedInputStream);
+
+        // 
+        // Unmarshall the example file
+        // 
+        // Note: Use InputSource (instead of InputStream) to prevent 
+        //       "org.xml.sax.SAXParseException: Premature end of file." exceptions
+        // 
+        Object jaxbElement = unmarshaller.unmarshal(new InputSource(new ByteArrayInputStream(example.getBytes())));
+
+        // 
+        // Marshall the output of the unmarshall
+        // 
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        marshaller.marshal(jaxbElement, baos);
+        byte[] bytes = baos.toByteArray();
+        String actual = new String(bytes);
+
+        // 
+        // Compare actual and expected
+        // 
+        try {
+            Diff myDiff = new Diff(expected, actual);
+            assertTrue("Files are similar " + myDiff, myDiff.similar());
+        }
+        catch (AssertionFailedError e) {
+            System.out.println("[Example XML: " + fileExample + "] " + '\n' + example + '\n');
+            System.out.println("[Expected XML: " + fileExpected + "] " + '\n' + expected + '\n');
+            System.out.println("[Actual XML] " + '\n' + actual + '\n');
+            throw e;            
+        }
+
+    }
+
+
+    private void convertNamespace(String fileExample,String fileExpected) throws Exception {
+
+        // 
+        // Create unmarshaller and marshaller
+        // 
+        JAXBContext jaxbContext = JAXBContext.newInstance( 
+                                    "org.apache.geronimo.jee.connector:" +
+                                    "org.apache.geronimo.jee.openejb:" +
+                                    "org.apache.geronimo.jee.web:" +
+                                    "org.apache.geronimo.jee.application:" +
+                                    "org.apache.geronimo.jee.applicationclient:" +
+                                    "org.apache.geronimo.jee.deployment:" +
+                                    "org.apache.geronimo.jee.naming:" +
+                                    "org.apache.geronimo.jee.security", getClass().getClassLoader() );
+        Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
+        Marshaller marshaller = jaxbContext.createMarshaller();
+        marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
+        marshaller.setProperty(Marshaller.JAXB_ENCODING, "UTF-8");
+
+        // 
+        // Create SAXParser
+        // 
+        SAXParserFactory factory = SAXParserFactory.newInstance();
+        factory.setNamespaceAware(true);
+        factory.setValidating(false);
+        SAXParser parser = factory.newSAXParser();
+
+        // 
+        // Create NamespaceFilter to filter for v1.1 namespaces
+        // 
+        NamespaceFilter xmlFilter = new NamespaceFilter(parser.getXMLReader());
+
+        // 
+        // Read example and expected XML files
+        // 
+        InputStream exampleInputStream = this.getClass().getClassLoader().getResourceAsStream(fileExample);
+        InputStream expectedInputStream = this.getClass().getClassLoader().getResourceAsStream(fileExpected);
+        String example = readContent(exampleInputStream);
+        String expected = readContent(expectedInputStream);
+
+        // 
+        // Unmarshall the example file
+        // 
+        SAXSource source = new SAXSource(xmlFilter, new InputSource(new ByteArrayInputStream(example.getBytes())));
+        Object jaxbElement = unmarshaller.unmarshal(source);
+
+        // 
+        // Marshall the output of the unmarshall
+        // 
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        marshaller.marshal(jaxbElement, baos);
+        byte[] bytes = baos.toByteArray();
+        String actual = new String(bytes);
+
+        // 
+        // Compare actual and expected
+        // 
+        try {
+            Diff myDiff = new Diff(expected, actual);
+            assertTrue("Files are similar " + myDiff, myDiff.similar());
+        }
+        catch (AssertionFailedError e) {
+            System.out.println("[Example XML: " + fileExample + "] " + '\n' + example + '\n');
+            System.out.println("[Expected XML: " + fileExpected + "] " + '\n' + expected + '\n');
+            System.out.println("[Actual XML] " + '\n' + actual + '\n');
+            throw e;            
+        }
+    }
+
+
+    private String readContent(InputStream in) throws IOException {
+        StringBuffer sb = new StringBuffer();
+        in = new BufferedInputStream(in);
+        int i = in.read();
+        while (i != -1) {
+            sb.append((char) i);
+            i = in.read();
+        }
+        String content = sb.toString();
+        return content;
+    }
+
+
+    private class NamespaceFilter extends XMLFilterImpl {
+
+        public NamespaceFilter(XMLReader xmlReader) {
+            super(xmlReader);
+        }
+
+        public void startElement(String uri, String localName, String qname, Attributes atts) throws SAXException {
+
+            if (uri.equals("http://geronimo.apache.org/xml/ns/j2ee/application-client-1.1")) {
+                uri = "http://geronimo.apache.org/xml/ns/j2ee/application-client-2.0";
+            }
+            else if (uri.equals("http://geronimo.apache.org/xml/ns/deployment-1.1")) {
+                uri = "http://geronimo.apache.org/xml/ns/deployment-1.2";
+            }
+            else if (uri.equals("http://geronimo.apache.org/xml/ns/naming-1.1")) {
+                uri = "http://geronimo.apache.org/xml/ns/naming-1.2";
+            }
+            else if (uri.equals("http://geronimo.apache.org/xml/ns/j2ee/application-1.2")) {
+                uri = "http://geronimo.apache.org/xml/ns/j2ee/application-2.0";
+            }
+            else if (uri.equals("http://geronimo.apache.org/xml/ns/security-1.1")) {
+                uri = "http://geronimo.apache.org/xml/ns/security-2.0";
+            }
+            else if (uri.equals("http://geronimo.apache.org/xml/ns/security-1.2")) {
+                uri = "http://geronimo.apache.org/xml/ns/security-2.0";
+            }
+            else if (uri.equals("http://geronimo.apache.org/xml/ns/j2ee/web-2.0")) {
+                uri = "http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1";
+            }
+            else if (uri.equals("http://geronimo.apache.org/xml/ns/j2ee/web-1.1")) {
+                uri = "http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1";
+            }
+
+            super.startElement(uri, localName, qname, atts);
+        }
+    }
+}

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/java/org/apache/geronimo/jee/web/GeronimoWebTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/java/org/apache/geronimo/jee/web/GeronimoWebTest.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/java/org/apache/geronimo/jee/web/GeronimoWebTest.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/application/geronimo-application-example-1.xml
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/application/geronimo-application-example-1.xml?rev=647891&r1=647890&r2=647891&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/application/geronimo-application-example-1.xml (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/application/geronimo-application-example-1.xml Mon Apr 14 09:40:39 2008
@@ -20,6 +20,7 @@
 
 <application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-2.0"
              xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2">
+
     <dep:environment>
         <dep:moduleId>
             <dep:groupId>org.apache.geronimo.testsuite</dep:groupId>
@@ -28,4 +29,5 @@
             <dep:type>car</dep:type>
         </dep:moduleId>
     </dep:environment>
+
 </application>

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/application/geronimo-application-example-2.xml
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/application/geronimo-application-example-2.xml?rev=647891&r1=647890&r2=647891&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/application/geronimo-application-example-2.xml (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/application/geronimo-application-example-2.xml Mon Apr 14 09:40:39 2008
@@ -19,13 +19,16 @@
 <!-- @version $Rev$ $Date$ -->
 
 <application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-2.0">
+
     <environment xmlns="http://geronimo.apache.org/xml/ns/deployment-1.2">
+
         <moduleId>
             <groupId>org.apache.geronimo.plugins.monitoring</groupId>
             <artifactId>agent-ear</artifactId>
             <version>2.2-SNAPSHOT</version>
             <type>ear</type>
         </moduleId>
+
         <dependencies>
             <dependency>
                 <groupId>org.apache.geronimo.plugins.monitoring</groupId>
@@ -34,5 +37,7 @@
                 <type>car</type>
             </dependency>
         </dependencies>
+
     </environment>
+
 </application>

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/application/geronimo-application-example-3.xml
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/application/geronimo-application-example-3.xml?rev=647891&r1=647890&r2=647891&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/application/geronimo-application-example-3.xml (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/application/geronimo-application-example-3.xml Mon Apr 14 09:40:39 2008
@@ -115,6 +115,7 @@
             </gbean>
         </connector>
     </module>
+
     <module>
         <web>web.war</web>
         <web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-2.0">
@@ -141,4 +142,5 @@
             </security>
         </web-app>
     </module>
+
 </application>

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/application/geronimo-application-example-4.xml
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/application/geronimo-application-example-4.xml?rev=647891&r1=647890&r2=647891&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/application/geronimo-application-example-4.xml (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/application/geronimo-application-example-4.xml Mon Apr 14 09:40:39 2008
@@ -20,6 +20,7 @@
 
 <application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-1.2"
              xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.1">
+
     <dep:environment>
         <dep:moduleId>
             <dep:groupId>org.apache.geronimo.testsuite</dep:groupId>
@@ -28,4 +29,5 @@
             <dep:type>car</dep:type>
         </dep:moduleId>
     </dep:environment>
+
 </application>

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/application/geronimo-application-example-5.xml
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/application/geronimo-application-example-5.xml?rev=647891&r1=647890&r2=647891&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/application/geronimo-application-example-5.xml (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/application/geronimo-application-example-5.xml Mon Apr 14 09:40:39 2008
@@ -19,13 +19,16 @@
 <!--  @version $Rev$ $Date$ -->
 
 <application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-1.2">
+
     <environment xmlns="http://geronimo.apache.org/xml/ns/deployment-1.1">
+
         <moduleId>
             <groupId>org.apache.geronimo.plugins.monitoring</groupId>
             <artifactId>agent-ear</artifactId>
             <version>2.2-SNAPSHOT</version>
             <type>ear</type>
         </moduleId>
+
         <dependencies>
             <dependency>
                 <groupId>org.apache.geronimo.plugins.monitoring</groupId>
@@ -34,5 +37,7 @@
                 <type>car</type>
             </dependency>
         </dependencies>
+
     </environment>
+
 </application>

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/application/geronimo-application-example-6.xml
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/application/geronimo-application-example-6.xml?rev=647891&r1=647890&r2=647891&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/application/geronimo-application-example-6.xml (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/application/geronimo-application-example-6.xml Mon Apr 14 09:40:39 2008
@@ -115,6 +115,7 @@
             </gbean>
         </connector>
     </module>
+
     <module>
         <web>web.war</web>
         <web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-2.0">
@@ -141,4 +142,5 @@
             </security>
         </web-app>
     </module>
+
 </application>

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/application/geronimo-application-expected-6.xml
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/application/geronimo-application-expected-6.xml?rev=647891&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/application/geronimo-application-expected-6.xml (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/application/geronimo-application-expected-6.xml Mon Apr 14 09:40:39 2008
@@ -0,0 +1,139 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+    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.
+-->
+
+<!-- @version $Rev$ $Date$ -->
+
+<application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-2.0" xmlns:ns2="http://geronimo.apache.org/xml/ns/deployment-1.2">
+    <ns2:environment>
+        <ns2:moduleId>
+            <ns2:groupId>org.apache.geronimo.testsuite</ns2:groupId>
+            <ns2:artifactId>jca-cms-ear</ns2:artifactId>
+            <ns2:version>2.2-SNAPSHOT</ns2:version>
+            <ns2:type>ear</ns2:type>
+        </ns2:moduleId>
+        <ns2:dependencies>
+            <ns2:dependency>
+                <ns2:groupId>org.apache.geronimo.configs</ns2:groupId>
+                <ns2:artifactId>system-database</ns2:artifactId>
+                <ns2:type>car</ns2:type>
+            </ns2:dependency>
+        </ns2:dependencies>
+    </ns2:environment>
+    <module>
+        <connector>tranql.rar</connector>
+        <connector:connector xmlns:connector="http://geronimo.apache.org/xml/ns/j2ee/connector-1.2">
+            <connector:resourceadapter>
+                <connector:outbound-resourceadapter>
+                    <connector:connection-definition>
+                        <connector:connectionfactory-interface>javax.sql.DataSource</connector:connectionfactory-interface>
+                        <connector:connectiondefinition-instance>
+                            <connector:name>cmsds</connector:name>
+                            <connector:config-property-setting xmlns:ns4="http://geronimo.apache.org/xml/ns/j2ee/application-2.0" xmlns="" name="DatabaseName">TestDatabase</connector:config-property-setting>
+                            <connector:config-property-setting xmlns:ns4="http://geronimo.apache.org/xml/ns/j2ee/application-2.0" xmlns="" name="CreateDatabase">false</connector:config-property-setting>
+                            <connector:connectionmanager>
+<connector:container-managed-security/>
+<connector:xa-transaction>
+    <connector:transaction-caching/>
+                                </connector:xa-transaction>
+<connector:single-pool>
+    <connector:max-size>10</connector:max-size>
+    <connector:blocking-timeout-milliseconds>5000</connector:blocking-timeout-milliseconds>
+    <connector:select-one-assume-match/>
+                                </connector:single-pool>
+                            </connector:connectionmanager>
+                        </connector:connectiondefinition-instance>
+                        <connector:connectiondefinition-instance>
+                            <connector:name>configuredsecurityds</connector:name>
+                            <connector:config-property-setting xmlns:ns4="http://geronimo.apache.org/xml/ns/j2ee/application-2.0" xmlns="" name="UserName">system</connector:config-property-setting>
+                            <connector:config-property-setting xmlns:ns4="http://geronimo.apache.org/xml/ns/j2ee/application-2.0" xmlns="" name="Password">manager</connector:config-property-setting>
+                            <connector:config-property-setting xmlns:ns4="http://geronimo.apache.org/xml/ns/j2ee/application-2.0" xmlns="" name="DatabaseName">TestDatabase</connector:config-property-setting>
+                            <connector:config-property-setting xmlns:ns4="http://geronimo.apache.org/xml/ns/j2ee/application-2.0" xmlns="" name="CreateDatabase">true</connector:config-property-setting>
+                            <connector:connectionmanager>
+<connector:xa-transaction>
+    <connector:transaction-caching/>
+                                </connector:xa-transaction>
+<connector:single-pool>
+    <connector:max-size>10</connector:max-size>
+    <connector:blocking-timeout-milliseconds>5000</connector:blocking-timeout-milliseconds>
+    <connector:select-one-assume-match/>
+                                </connector:single-pool>
+                            </connector:connectionmanager>
+                        </connector:connectiondefinition-instance>
+                    </connector:connection-definition>
+                </connector:outbound-resourceadapter>
+            </connector:resourceadapter>
+            <connector:gbean xmlns:ns4="http://geronimo.apache.org/xml/ns/j2ee/application-2.0" xmlns="" class="org.apache.geronimo.security.realm.GenericSecurityRealm" name="test-cms-realm">
+                <connector:attribute name="realmName">test-cms-realm</connector:attribute>
+                <connector:xml-reference xmlns:lc="http://geronimo.apache.org/xml/ns/loginconfig-1.1" name="LoginModuleConfiguration">
+                    <lc:login-config>
+                        <lc:login-module-ref control-flag="REQUIRED">
+                            <lc:pattern>
+<ns2:name>test-cms-credentials
+                                </ns2:name>
+                            </lc:pattern>
+                        </lc:login-module-ref>
+                        <lc:login-module control-flag="REQUIRED" wrap-principals="false">
+                            <lc:login-domain-name>test-app-credentials</lc:login-domain-name>
+                            <lc:login-module-class>org.apache.geronimo.security.realm.providers.PropertiesFileLoginModule</lc:login-module-class>
+                            <lc:option name="usersURI">var/security/demo_users.properties</lc:option>
+                            <lc:option name="groupsURI">var/security/demo_groups.properties</lc:option>
+                        </lc:login-module>
+                    </lc:login-config>
+                </connector:xml-reference>
+                <connector:reference name="ServerInfo">
+                    <connector:name>ServerInfo</connector:name>
+                </connector:reference>
+            </connector:gbean>
+            <connector:gbean xmlns:ns4="http://geronimo.apache.org/xml/ns/j2ee/application-2.0" xmlns="" class="org.apache.geronimo.connector.outbound.security.PasswordCredentialLoginModuleWrapperGBean" name="test-cms-credentials">
+                <connector:attribute name="loginModuleClass">
+                    org.apache.geronimo.connector.outbound.security.CallerIdentityPasswordCredentialLoginModule
+                </connector:attribute>
+                <connector:reference name="ManagedConnectionFactoryWrapper">
+                    <connector:name>cmsds</connector:name>
+                </connector:reference>
+                <connector:attribute name="loginDomainName">test-cms-credentials</connector:attribute>
+            </connector:gbean>
+        </connector:connector>
+    </module>
+    <module>
+        <web>web.war</web>
+        <web-app:web-app xmlns:web-app="http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1">
+            <web-app:security-realm-name>test-cms-realm</web-app:security-realm-name>
+            <security:security xmlns:security="http://geronimo.apache.org/xml/ns/security-2.0">
+                <security:credential-store-ref>
+                    <ns2:name>test-credential-store</ns2:name>
+                </security:credential-store-ref>
+                <security:default-subject>
+                    <security:realm>test-cms-realm</security:realm>
+                    <security:id>test</security:id>
+                </security:default-subject>
+                <security:role-mappings>
+                    <security:role xmlns:ns5="http://geronimo.apache.org/xml/ns/j2ee/application-2.0" xmlns="" role-name="test">
+                        <security:principal class="org.apache.geronimo.connector.outbound.security.ResourcePrincipal" name="george"/>
+                    </security:role>
+                    <security:role xmlns:ns5="http://geronimo.apache.org/xml/ns/j2ee/application-2.0" xmlns="" role-name="fail">
+                        <security:run-as-subject>
+                            <security:realm>test-cms-realm</security:realm>
+                            <security:id>fail</security:id>
+                        </security:run-as-subject>
+                    </security:role>
+                </security:role-mappings>
+            </security:security>
+        </web-app:web-app>
+    </module>
+</application>

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/application/geronimo-application-expected-6.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/application/geronimo-application-expected-6.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/application/geronimo-application-expected-6.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/applicationclient/geronimo-application-client-example-2.xml
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/applicationclient/geronimo-application-client-example-2.xml?rev=647891&r1=647890&r2=647891&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/applicationclient/geronimo-application-client-example-2.xml (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/applicationclient/geronimo-application-client-example-2.xml Mon Apr 14 09:40:39 2008
@@ -20,6 +20,7 @@
 
 <application-client
    xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-client-2.0"
+   xmlns:naming="http://geronimo.apache.org/xml/ns/naming-1.2"
    xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2">
 
     <dep:client-environment>
@@ -40,15 +41,15 @@
         </dep:moduleId>
     </dep:server-environment>
 
-    <service-ref>
-        <service-ref-name>services/Greeter</service-ref-name>
-        <port>
-            <port-name>GreeterPort</port-name>
-            <protocol>http</protocol>
-            <host>localhost</host>
-            <port>8080</port>
-            <uri>/jaxws-war/servlet2</uri>
-        </port>
-    </service-ref>
+    <naming:service-ref>
+        <naming:service-ref-name>services/Greeter</naming:service-ref-name>
+        <naming:port>
+            <naming:port-name>GreeterPort</naming:port-name>
+            <naming:protocol>http</naming:protocol>
+            <naming:host>localhost</naming:host>
+            <naming:port>8080</naming:port>
+            <naming:uri>/jaxws-war/servlet2</naming:uri>
+        </naming:port>
+    </naming:service-ref>
 
 </application-client>

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/applicationclient/geronimo-application-client-example-3.xml
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/applicationclient/geronimo-application-client-example-3.xml?rev=647891&r1=647890&r2=647891&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/applicationclient/geronimo-application-client-example-3.xml (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/applicationclient/geronimo-application-client-example-3.xml Mon Apr 14 09:40:39 2008
@@ -81,4 +81,5 @@
             </css:css>
         </xml-attribute>
     </gbean>
+
 </application-client>

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/applicationclient/geronimo-application-client-example-5.xml
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/applicationclient/geronimo-application-client-example-5.xml?rev=647891&r1=647890&r2=647891&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/applicationclient/geronimo-application-client-example-5.xml (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/applicationclient/geronimo-application-client-example-5.xml Mon Apr 14 09:40:39 2008
@@ -20,6 +20,7 @@
 
 <application-client
    xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-client-1.1"
+   xmlns:naming="http://geronimo.apache.org/xml/ns/naming-1.1"
    xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.1">
 
     <dep:client-environment>
@@ -40,15 +41,15 @@
         </dep:moduleId>
     </dep:server-environment>
 
-    <service-ref>
-        <service-ref-name>services/Greeter</service-ref-name>
-        <port>
-            <port-name>GreeterPort</port-name>
-            <protocol>http</protocol>
-            <host>localhost</host>
-            <port>8080</port>
-            <uri>/jaxws-war/servlet2</uri>
-        </port>
-    </service-ref>
+    <naming:service-ref>
+        <naming:service-ref-name>services/Greeter</naming:service-ref-name>
+        <naming:port>
+            <naming:port-name>GreeterPort</naming:port-name>
+            <naming:protocol>http</naming:protocol>
+            <naming:host>localhost</naming:host>
+            <naming:port>8080</naming:port>
+            <naming:uri>/jaxws-war/servlet2</naming:uri>
+        </naming:port>
+    </naming:service-ref>
 
 </application-client>

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/applicationclient/geronimo-application-client-example-6.xml
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/applicationclient/geronimo-application-client-example-6.xml?rev=647891&r1=647890&r2=647891&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/applicationclient/geronimo-application-client-example-6.xml (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/applicationclient/geronimo-application-client-example-6.xml Mon Apr 14 09:40:39 2008
@@ -81,4 +81,5 @@
             </css:css>
         </xml-attribute>
     </gbean>
+
 </application-client>

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/applicationclient/geronimo-application-client-expected-2.xml
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/applicationclient/geronimo-application-client-expected-2.xml?rev=647891&r1=647890&r2=647891&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/applicationclient/geronimo-application-client-expected-2.xml (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/applicationclient/geronimo-application-client-expected-2.xml Mon Apr 14 09:40:39 2008
@@ -35,4 +35,14 @@
             <type>car</type>
         </moduleId>
     </server-environment>
+    <ns2:service-ref>
+        <ns2:service-ref-name>services/Greeter</ns2:service-ref-name>
+        <ns2:port>
+            <ns2:port-name>GreeterPort</ns2:port-name>
+            <ns2:protocol>http</ns2:protocol>
+            <ns2:host>localhost</ns2:host>
+            <ns2:port>8080</ns2:port>
+            <ns2:uri>/jaxws-war/servlet2</ns2:uri>
+        </ns2:port>
+    </ns2:service-ref>
 </ns4:application-client>

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/web/geronimo-web-example-1.xml
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/web/geronimo-web-example-1.xml?rev=647891&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/web/geronimo-web-example-1.xml (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/web/geronimo-web-example-1.xml Mon Apr 14 09:40:39 2008
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+-->
+
+<!-- @version $Rev$ $Date$ -->
+
+<web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1"
+         xmlns:naming="http://geronimo.apache.org/xml/ns/naming-1.2"
+         xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2">
+
+    <dep:environment>
+        <dep:moduleId>
+            <dep:groupId>jaxws-calculator</dep:groupId>
+            <dep:artifactId>calculator</dep:artifactId>
+            <dep:version>2.1</dep:version>
+            <dep:type>war</dep:type>
+        </dep:moduleId>
+    </dep:environment>
+
+    <context-root>/jaxws-calculator</context-root>
+
+    <naming:service-ref>
+        <naming:service-ref-name>services/Calculator</naming:service-ref-name>
+        <naming:port>
+            <naming:port-name>CalculatorPort</naming:port-name>
+            <naming:protocol>http</naming:protocol>
+            <naming:host>localhost</naming:host>
+            <naming:port>8080</naming:port>
+            <naming:uri>/jaxws-calculator/calculator</naming:uri>
+        </naming:port>
+    </naming:service-ref>
+
+</web-app>

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/web/geronimo-web-example-1.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/web/geronimo-web-example-1.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/web/geronimo-web-example-1.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/web/geronimo-web-example-2.xml
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/web/geronimo-web-example-2.xml?rev=647891&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/web/geronimo-web-example-2.xml (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/web/geronimo-web-example-2.xml Mon Apr 14 09:40:39 2008
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+   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.
+-->
+
+<!-- @version $Rev$ $Date$ -->
+
+<web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1"
+         xmlns:sec="http://geronimo.apache.org/xml/ns/security-2.0"
+         xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2">
+
+    <dep:environment>
+        <dep:moduleId>
+            <dep:groupId>org.apache.geronimo.plugins</dep:groupId>
+            <dep:artifactId>geronimo-remote-deploy</dep:artifactId>
+            <dep:version>2.2-SNAPSHOT</dep:version>
+        </dep:moduleId>
+        <dep:dependencies/>
+        <dep:hidden-classes/>
+        <dep:non-overridable-classes/>
+    </dep:environment>
+
+    <context-root>/remote-deploy</context-root>
+
+    <context-priority-classloader>true</context-priority-classloader>
+
+    <security-realm-name>geronimo-admin</security-realm-name>
+
+    <sec:security>
+        <sec:default-principal>
+            <sec:principal class="org.apache.geronimo.security.realm.providers.GeronimoUserPrincipal"
+                           name="anonymous"/>
+        </sec:default-principal>
+        <sec:role-mappings>
+            <sec:role role-name="admin">
+                <sec:principal class="org.apache.geronimo.security.realm.providers.GeronimoGroupPrincipal"
+                               name="admin" designated-run-as="true"/>
+            </sec:role>
+        </sec:role-mappings>
+    </sec:security>
+
+    <dep:gbean name="LocatorToken" class="org.apache.geronimo.deployment.remote.RemoteDeployGBean" />
+
+</web-app>

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/web/geronimo-web-example-2.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/web/geronimo-web-example-2.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/web/geronimo-web-example-2.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/web/geronimo-web-example-3.xml
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/web/geronimo-web-example-3.xml?rev=647891&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/web/geronimo-web-example-3.xml (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/web/geronimo-web-example-3.xml Mon Apr 14 09:40:39 2008
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    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.
+-->
+
+<!-- @version $Rev$ $Date$ -->
+
+<web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1"
+         xmlns:sec="http://geronimo.apache.org/xml/ns/security-2.0"
+         xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.2">
+
+    <sys:environment>
+        <sys:moduleId>
+            <sys:groupId>org.apache.geronimo.testsuite</sys:groupId>
+            <sys:artifactId>test-security</sys:artifactId>
+            <sys:version>2.2-SNAPSHOT</sys:version>
+            <sys:type>war</sys:type>
+        </sys:moduleId>
+        <sys:hidden-classes/>
+        <sys:non-overridable-classes/>
+    </sys:environment>
+
+    <context-root>/demo</context-root>
+
+    <security-realm-name>demo-properties-realm</security-realm-name>
+
+    <sec:security>
+        <sec:default-principal>
+            <sec:principal class="org.apache.geronimo.security.realm.providers.GeronimoUserPrincipal" name="izumi"/>
+        </sec:default-principal>
+        <sec:role-mappings>
+            <sec:role role-name="content-administrator">
+                <sec:principal class="org.apache.geronimo.security.realm.providers.GeronimoGroupPrincipal" name="it" designated-run-as="true"/>
+                <sec:principal class="org.apache.geronimo.security.realm.providers.GeronimoUserPrincipal" name="metro"/>
+                <sec:principal class="org.apache.geronimo.security.realm.providers.GeronimoUserPrincipal" name="george"/>
+            </sec:role>
+        </sec:role-mappings>
+    </sec:security>
+
+    <gbean name="demo-properties-realm" class="org.apache.geronimo.security.realm.GenericSecurityRealm" xsi:type="dep:gbeanType" xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+        <attribute name="realmName">demo-properties-realm</attribute>
+        <reference name="ServerInfo">
+            <name>ServerInfo</name>
+        </reference>
+        <xml-reference name="LoginModuleConfiguration">
+            <log:login-config xmlns:log="http://geronimo.apache.org/xml/ns/loginconfig-1.2">
+                <log:login-module control-flag="REQUIRED" wrap-principals="false">
+                    <log:login-domain-name>demo-properties-realm</log:login-domain-name>
+                    <log:login-module-class>org.apache.geronimo.security.realm.providers.PropertiesFileLoginModule</log:login-module-class>
+                    <log:option name="usersURI">var/security/demo_users.properties</log:option>
+                    <log:option name="groupsURI">var/security/demo_groups.properties</log:option>
+                </log:login-module>
+            </log:login-config>
+        </xml-reference>
+    </gbean>
+
+</web-app>

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/web/geronimo-web-example-3.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/web/geronimo-web-example-3.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/web/geronimo-web-example-3.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/web/geronimo-web-example-4.xml
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/web/geronimo-web-example-4.xml?rev=647891&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/web/geronimo-web-example-4.xml (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/web/geronimo-web-example-4.xml Mon Apr 14 09:40:39 2008
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    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.
+-->
+
+<!-- @version $Rev$ $Date$ -->
+
+<web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.1"
+         xmlns:sec="http://geronimo.apache.org/xml/ns/security-1.1"
+         xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.1">
+
+    <sys:environment>
+        <sys:moduleId>
+            <sys:groupId>org.apache.geronimo.testsuite</sys:groupId>
+            <sys:artifactId>test-security</sys:artifactId>
+            <sys:version>2.2-SNAPSHOT</sys:version>
+            <sys:type>war</sys:type>
+        </sys:moduleId>
+        <sys:hidden-classes/>
+        <sys:non-overridable-classes/>
+    </sys:environment>
+
+    <context-root>/demo</context-root>
+
+    <security-realm-name>demo-properties-realm</security-realm-name>
+
+    <sec:security>
+        <sec:default-principal>
+            <sec:principal class="org.apache.geronimo.security.realm.providers.GeronimoUserPrincipal" name="izumi"/>
+        </sec:default-principal>
+        <sec:role-mappings>
+            <sec:role role-name="content-administrator">
+                <sec:principal class="org.apache.geronimo.security.realm.providers.GeronimoGroupPrincipal" name="it" designated-run-as="true"/>
+                <sec:principal class="org.apache.geronimo.security.realm.providers.GeronimoUserPrincipal" name="metro"/>
+                <sec:principal class="org.apache.geronimo.security.realm.providers.GeronimoUserPrincipal" name="george"/>
+            </sec:role>
+        </sec:role-mappings>
+    </sec:security>
+
+    <gbean name="demo-properties-realm" class="org.apache.geronimo.security.realm.GenericSecurityRealm" xsi:type="dep:gbeanType" xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+        <attribute name="realmName">demo-properties-realm</attribute>
+        <reference name="ServerInfo">
+            <name>ServerInfo</name>
+        </reference>
+        <xml-reference name="LoginModuleConfiguration">
+            <log:login-config xmlns:log="http://geronimo.apache.org/xml/ns/loginconfig-1.2">
+                <log:login-module control-flag="REQUIRED" wrap-principals="false">
+                    <log:login-domain-name>demo-properties-realm</log:login-domain-name>
+                    <log:login-module-class>org.apache.geronimo.security.realm.providers.PropertiesFileLoginModule</log:login-module-class>
+                    <log:option name="usersURI">var/security/demo_users.properties</log:option>
+                    <log:option name="groupsURI">var/security/demo_groups.properties</log:option>
+                </log:login-module>
+            </log:login-config>
+        </xml-reference>
+    </gbean>
+
+</web-app>

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/web/geronimo-web-example-4.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/web/geronimo-web-example-4.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/web/geronimo-web-example-4.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/web/geronimo-web-example-5.xml
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/web/geronimo-web-example-5.xml?rev=647891&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/web/geronimo-web-example-5.xml (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/web/geronimo-web-example-5.xml Mon Apr 14 09:40:39 2008
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+-->
+
+<!-- @version $Rev$ $Date$ -->
+
+<web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-2.0"
+         xmlns:naming="http://geronimo.apache.org/xml/ns/naming-1.1"
+         xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.1">
+
+    <dep:environment>
+        <dep:moduleId>
+            <dep:groupId>jaxws-calculator</dep:groupId>
+            <dep:artifactId>calculator</dep:artifactId>
+            <dep:version>2.1</dep:version>
+            <dep:type>war</dep:type>
+        </dep:moduleId>
+    </dep:environment>
+
+    <context-root>/jaxws-calculator</context-root>
+
+    <naming:service-ref>
+        <naming:service-ref-name>services/Calculator</naming:service-ref-name>
+        <naming:port>
+            <naming:port-name>CalculatorPort</naming:port-name>
+            <naming:protocol>http</naming:protocol>
+            <naming:host>localhost</naming:host>
+            <naming:port>8080</naming:port>
+            <naming:uri>/jaxws-calculator/calculator</naming:uri>
+        </naming:port>
+    </naming:service-ref>
+
+</web-app>

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/web/geronimo-web-example-5.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/web/geronimo-web-example-5.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/web/geronimo-web-example-5.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/web/geronimo-web-example-6.xml
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/web/geronimo-web-example-6.xml?rev=647891&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/web/geronimo-web-example-6.xml (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/web/geronimo-web-example-6.xml Mon Apr 14 09:40:39 2008
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+   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.
+-->
+
+<!-- @version $Rev$ $Date$ -->
+
+<web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.1"
+         xmlns:sec="http://geronimo.apache.org/xml/ns/security-1.1"
+         xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.1">
+
+    <dep:environment>
+        <dep:moduleId>
+            <dep:groupId>org.apache.geronimo.plugins</dep:groupId>
+            <dep:artifactId>geronimo-remote-deploy</dep:artifactId>
+            <dep:version>2.2-SNAPSHOT</dep:version>
+        </dep:moduleId>
+        <dep:dependencies/>
+        <dep:hidden-classes/>
+        <dep:non-overridable-classes/>
+    </dep:environment>
+
+    <context-root>/remote-deploy</context-root>
+
+    <context-priority-classloader>true</context-priority-classloader>
+
+    <security-realm-name>geronimo-admin</security-realm-name>
+
+    <sec:security>
+        <sec:default-principal>
+            <sec:principal class="org.apache.geronimo.security.realm.providers.GeronimoUserPrincipal"
+                           name="anonymous"/>
+        </sec:default-principal>
+        <sec:role-mappings>
+            <sec:role role-name="admin">
+                <sec:principal class="org.apache.geronimo.security.realm.providers.GeronimoGroupPrincipal"
+                               name="admin" designated-run-as="true"/>
+            </sec:role>
+        </sec:role-mappings>
+    </sec:security>
+
+    <dep:gbean name="LocatorToken" class="org.apache.geronimo.deployment.remote.RemoteDeployGBean" />
+
+</web-app>

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/web/geronimo-web-example-6.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/web/geronimo-web-example-6.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/web/geronimo-web-example-6.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/web/geronimo-web-expected-1.xml
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/web/geronimo-web-expected-1.xml?rev=647891&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/web/geronimo-web-expected-1.xml (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/web/geronimo-web-expected-1.xml Mon Apr 14 09:40:39 2008
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+  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.
+-->
+           
+<!-- @version $Rev$ $Date$ -->
+           
+<ns8:web-app xmlns="http://geronimo.apache.org/xml/ns/deployment-1.2" xmlns:ns2="http://geronimo.apache.org/xml/ns/j2ee/connector-1.2" xmlns:ns3="http://geronimo.apache.org/xml/ns/naming-1.2" xmlns:ns4="http://geronimo.apache.org/xml/ns/j2ee/ejb/openejb-2.0" xmlns:ns5="http://geronimo.apache.org/xml/ns/j2ee/application-2.0" xmlns:ns6="http://geronimo.apache.org/xml/ns/security-2.0" xmlns:ns7="http://java.sun.com/xml/ns/persistence" xmlns:ns8="http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1" xmlns:ns9="http://geronimo.apache.org/xml/ns/j2ee/application-client-2.0">
+    <environment>
+        <moduleId>
+            <groupId>jaxws-calculator</groupId>
+            <artifactId>calculator</artifactId>
+            <version>2.1</version>
+            <type>war</type>
+        </moduleId>
+    </environment>
+    <ns8:context-root>/jaxws-calculator</ns8:context-root>
+    <ns3:service-ref>
+        <ns3:service-ref-name>services/Calculator</ns3:service-ref-name>
+        <ns3:port>
+            <ns3:port-name>CalculatorPort</ns3:port-name>
+            <ns3:protocol>http</ns3:protocol>
+            <ns3:host>localhost</ns3:host>
+            <ns3:port>8080</ns3:port>
+            <ns3:uri>/jaxws-calculator/calculator</ns3:uri>
+        </ns3:port>
+    </ns3:service-ref>
+</ns8:web-app>

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/web/geronimo-web-expected-1.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/web/geronimo-web-expected-1.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.v21.jaxbmodel/src/test/resources/web/geronimo-web-expected-1.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml



Mime
View raw message