geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r882333 [3/11] - in /geronimo/server/trunk/plugins: ./ jetty7/ jetty8/ jetty8/geronimo-jetty7-builder/ jetty8/geronimo-jetty7-clustering-builder-wadi/ jetty8/geronimo-jetty7-clustering-wadi/ jetty8/geronimo-jetty7/ jetty8/geronimo-jetty8-bu...
Date Thu, 19 Nov 2009 22:21:55 GMT
Added: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/main/xsd/geronimo-jetty-config-1.0.1.xsd
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/main/xsd/geronimo-jetty-config-1.0.1.xsd?rev=882333&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/main/xsd/geronimo-jetty-config-1.0.1.xsd (added)
+++ geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/main/xsd/geronimo-jetty-config-1.0.1.xsd Thu Nov 19 22:21:48 2009
@@ -0,0 +1,90 @@
+<?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.
+-->
+
+<xs:schema xmlns:jetty="http://geronimo.apache.org/xml/ns/web/jetty/config-1.0.1"
+    targetNamespace="http://geronimo.apache.org/xml/ns/web/jetty/config-1.0.1"
+    xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
+    attributeFormDefault="unqualified" version="1.0">
+
+    <xs:annotation>
+        <xs:documentation>
+            This is an XML Schema Definition for Geronimo jetty specific
+            configuration. It is a used as a sub part of the web application
+            deployment plan. The elements defined in this plan are included in
+            container-config element of web application plan. The top level
+            element included in container-config is jetty with namespace
+            specified as
+            xmlns="http://geronimo.apache.org/xml/ns/web/jetty/config-1.0.1". The
+            default location for this document is
+            http://geronimo.apache.org/xml/ns/web/jetty/config-1.0.1
+        </xs:documentation>
+    </xs:annotation>
+    <xs:element name="jetty" type="jetty:jetty-configType">
+        <xs:annotation>
+            <xs:documentation>
+                The jetty element is the root of the deployment descriptor for a
+                jetty specific configuration in web application. Note that the
+                sub-elements of this element should be as in the given order in
+                a sequence.
+            </xs:documentation>
+        </xs:annotation>
+    </xs:element>
+
+    <xs:complexType name="jetty-configType">
+        <xs:sequence>
+            <xs:element name="host" type="xs:string" minOccurs="0"
+                maxOccurs="unbounded">
+                <xs:annotation>
+                    <xs:documentation>
+                        The host element maps the web application to this
+                        particular host name.
+                    </xs:documentation>
+                </xs:annotation>
+            </xs:element>
+            <xs:element name="virtual-host" type="xs:string" minOccurs="0"
+                maxOccurs="unbounded">
+                <xs:annotation>
+                    <xs:documentation>
+                        The virtual-host element maps the web application to
+                        this particular host name.
+                    </xs:documentation>
+                </xs:annotation>
+            </xs:element>
+            <xs:element name="session-manager" type="xs:string" minOccurs="0">
+                <xs:annotation>
+                    <xs:documentation>
+                        The session-manager provides the fully qualified class
+                        name of the clustering implementation
+                        (org.codehaus.wadi.jetty5.JettyManager) used by this web
+                        application.
+                    </xs:documentation>
+                </xs:annotation>
+            </xs:element>
+            <xs:element name="compact-path" type="xs:boolean" minOccurs="0">
+                <xs:annotation>
+                    <xs:documentation>
+                        See Jetty-386.  Setting this to true makes paths like http://localhost:8080/test//favicon.ico
+                        act the same as http://localhost:8080/test/favicon.ico.  Setting this to true is likely to result
+                        in a security vulnerability such as exposing static content in WEB-INF and behind security constraints.
+                    </xs:documentation>
+                </xs:annotation>
+            </xs:element>
+        </xs:sequence>
+    </xs:complexType>
+
+</xs:schema>

Propchange: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/main/xsd/geronimo-jetty-config-1.0.1.xsd
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/main/xsd/geronimo-jetty-config-1.0.1.xsd
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/main/xsd/geronimo-jetty-config-1.0.1.xsd
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/main/xsdconfig/xmlconfig.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/main/xsdconfig/xmlconfig.xml?rev=882333&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/main/xsdconfig/xmlconfig.xml (added)
+++ geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/main/xsdconfig/xmlconfig.xml Thu Nov 19 22:21:48 2009
@@ -0,0 +1,32 @@
+<?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$ -->
+<xb:config xmlns:xb="http://www.bea.com/2002/09/xbean/config">
+
+    <xb:namespace uri="http://geronimo.apache.org/xml/ns/j2ee/web/jetty-2.0.2">
+        <xb:package>org.apache.geronimo.xbeans.geronimo.web.jetty</xb:package>
+        <xb:prefix>Jetty</xb:prefix>
+    </xb:namespace>
+
+    <xb:namespace uri="http://geronimo.apache.org/xml/ns/web/jetty/config-1.0.1">
+        <xb:package>org.apache.geronimo.xbeans.geronimo.web.jetty.config</xb:package>
+        <xb:prefix>Ger</xb:prefix>
+    </xb:namespace>
+
+</xb:config>

Propchange: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/main/xsdconfig/xmlconfig.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/main/xsdconfig/xmlconfig.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/main/xsdconfig/xmlconfig.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/java/org/apache/geronimo/jetty8/app/Filter1.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/java/org/apache/geronimo/jetty8/app/Filter1.java?rev=882333&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/java/org/apache/geronimo/jetty8/app/Filter1.java (added)
+++ geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/java/org/apache/geronimo/jetty8/app/Filter1.java Thu Nov 19 22:21:48 2009
@@ -0,0 +1,45 @@
+/**
+ *  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.jetty8.app;
+
+import java.io.IOException;
+import javax.servlet.Filter;
+import javax.servlet.FilterConfig;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.FilterChain;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class Filter1 implements Filter {
+
+    private FilterConfig filterConfig;
+
+    public void init(FilterConfig filterConfig) throws ServletException {
+        this.filterConfig = filterConfig;
+    }
+
+    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
+        chain.doFilter(request, response);
+    }
+
+    public void destroy() {
+
+    }
+}

Propchange: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/java/org/apache/geronimo/jetty8/app/Filter1.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/java/org/apache/geronimo/jetty8/app/Filter1.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/java/org/apache/geronimo/jetty8/app/Filter1.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/java/org/apache/geronimo/jetty8/app/Filter2.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/java/org/apache/geronimo/jetty8/app/Filter2.java?rev=882333&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/java/org/apache/geronimo/jetty8/app/Filter2.java (added)
+++ geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/java/org/apache/geronimo/jetty8/app/Filter2.java Thu Nov 19 22:21:48 2009
@@ -0,0 +1,45 @@
+/**
+ *  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.jetty8.app;
+
+import java.io.IOException;
+import javax.servlet.Filter;
+import javax.servlet.FilterConfig;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.FilterChain;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class Filter2 implements Filter {
+
+    private FilterConfig filterConfig;
+
+    public void init(FilterConfig filterConfig) throws ServletException {
+        this.filterConfig = filterConfig;
+    }
+
+    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
+        chain.doFilter(request, response);
+    }
+
+    public void destroy() {
+
+    }
+}

Propchange: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/java/org/apache/geronimo/jetty8/app/Filter2.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/java/org/apache/geronimo/jetty8/app/Filter2.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/java/org/apache/geronimo/jetty8/app/Filter2.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/java/org/apache/geronimo/jetty8/app/Servlet1.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/java/org/apache/geronimo/jetty8/app/Servlet1.java?rev=882333&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/java/org/apache/geronimo/jetty8/app/Servlet1.java (added)
+++ geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/java/org/apache/geronimo/jetty8/app/Servlet1.java Thu Nov 19 22:21:48 2009
@@ -0,0 +1,52 @@
+/**
+ *  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.jetty8.app;
+
+import java.io.IOException;
+import javax.servlet.Servlet;
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class Servlet1 implements Servlet {
+
+    private ServletConfig servletConfig;
+
+    public void init(ServletConfig config) throws ServletException {
+        servletConfig = config;
+    }
+
+    public ServletConfig getServletConfig() {
+        return servletConfig;
+    }
+
+    public void service(ServletRequest req, ServletResponse res) throws ServletException, IOException {
+
+    }
+
+    public String getServletInfo() {
+        return null;
+    }
+
+    public void destroy() {
+
+    }
+}

Propchange: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/java/org/apache/geronimo/jetty8/app/Servlet1.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/java/org/apache/geronimo/jetty8/app/Servlet1.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/java/org/apache/geronimo/jetty8/app/Servlet1.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/java/org/apache/geronimo/jetty8/app/Servlet2.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/java/org/apache/geronimo/jetty8/app/Servlet2.java?rev=882333&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/java/org/apache/geronimo/jetty8/app/Servlet2.java (added)
+++ geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/java/org/apache/geronimo/jetty8/app/Servlet2.java Thu Nov 19 22:21:48 2009
@@ -0,0 +1,52 @@
+/**
+ *  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.jetty8.app;
+
+import java.io.IOException;
+import javax.servlet.Servlet;
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class Servlet2 implements Servlet {
+    
+    private ServletConfig servletConfig;
+    
+    public void init(ServletConfig config) throws ServletException {
+        servletConfig = config;
+    }
+
+    public ServletConfig getServletConfig() {
+        return servletConfig;
+    }
+
+    public void service(ServletRequest req, ServletResponse res) throws ServletException, IOException {
+
+    }
+
+    public String getServletInfo() {
+        return null;
+    }
+
+    public void destroy() {
+
+    }
+}

Propchange: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/java/org/apache/geronimo/jetty8/app/Servlet2.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/java/org/apache/geronimo/jetty8/app/Servlet2.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/java/org/apache/geronimo/jetty8/app/Servlet2.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/java/org/apache/geronimo/jetty8/deployment/JettyModuleBuilderTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/java/org/apache/geronimo/jetty8/deployment/JettyModuleBuilderTest.java?rev=882333&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/java/org/apache/geronimo/jetty8/deployment/JettyModuleBuilderTest.java (added)
+++ geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/java/org/apache/geronimo/jetty8/deployment/JettyModuleBuilderTest.java Thu Nov 19 22:21:48 2009
@@ -0,0 +1,321 @@
+/**
+ *  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.jetty8.deployment;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+
+import org.apache.geronimo.common.DeploymentException;
+import org.apache.geronimo.connector.wrapper.outbound.connectiontracking.ConnectionTrackingCoordinatorGBean;
+import org.apache.geronimo.deployment.ModuleIDBuilder;
+import org.apache.geronimo.deployment.service.GBeanBuilder;
+import org.apache.geronimo.deployment.util.UnpackedJarFile;
+import org.apache.geronimo.gbean.AbstractName;
+import org.apache.geronimo.gbean.AbstractNameQuery;
+import org.apache.geronimo.gbean.GBeanData;
+import org.apache.geronimo.j2ee.deployment.EARContext;
+import org.apache.geronimo.j2ee.deployment.Module;
+import org.apache.geronimo.j2ee.deployment.ModuleBuilderExtension;
+import org.apache.geronimo.j2ee.deployment.NamingBuilderCollection;
+import org.apache.geronimo.j2ee.deployment.UnavailableWebServiceBuilder;
+import org.apache.geronimo.j2ee.deployment.WebServiceBuilder;
+import org.apache.geronimo.j2ee.management.impl.J2EEServerImpl;
+import org.apache.geronimo.jetty8.JettyContainerImpl;
+import org.apache.geronimo.jetty8.connector.HTTPSocketConnector;
+import org.apache.geronimo.kernel.Jsr77Naming;
+import org.apache.geronimo.kernel.Kernel;
+import org.apache.geronimo.kernel.KernelFactory;
+import org.apache.geronimo.kernel.Naming;
+import org.apache.geronimo.kernel.config.Configuration;
+import org.apache.geronimo.kernel.config.ConfigurationData;
+import org.apache.geronimo.kernel.config.ConfigurationManager;
+import org.apache.geronimo.kernel.config.ConfigurationModuleType;
+import org.apache.geronimo.kernel.config.ConfigurationStore;
+import org.apache.geronimo.kernel.config.ConfigurationUtil;
+import org.apache.geronimo.kernel.config.KernelConfigurationManager;
+import org.apache.geronimo.kernel.config.LifecycleException;
+import org.apache.geronimo.kernel.config.NoSuchConfigException;
+import org.apache.geronimo.kernel.management.State;
+import org.apache.geronimo.kernel.mock.MockConfigStore;
+import org.apache.geronimo.kernel.osgi.MockBundle;
+import org.apache.geronimo.kernel.repository.Artifact;
+import org.apache.geronimo.kernel.repository.ArtifactManager;
+import org.apache.geronimo.kernel.repository.ArtifactResolver;
+import org.apache.geronimo.kernel.repository.DefaultArtifactManager;
+import org.apache.geronimo.kernel.repository.DefaultArtifactResolver;
+import org.apache.geronimo.kernel.repository.Environment;
+import org.apache.geronimo.kernel.repository.ImportType;
+import org.apache.geronimo.kernel.repository.ListableRepository;
+import org.apache.geronimo.security.SecurityServiceImpl;
+import org.apache.geronimo.security.deployment.GeronimoSecurityBuilderImpl;
+import org.apache.geronimo.security.jacc.mappingprovider.GeronimoPolicy;
+import org.apache.geronimo.security.jacc.mappingprovider.GeronimoPolicyConfigurationFactory;
+import org.apache.geronimo.system.serverinfo.BasicServerInfo;
+import org.apache.geronimo.system.serverinfo.ServerInfo;
+import org.apache.geronimo.testsupport.TestSupport;
+import org.apache.geronimo.transaction.wrapper.manager.GeronimoTransactionManagerGBean;
+import org.apache.geronimo.xbeans.geronimo.j2ee.GerSecurityDocument;
+import org.apache.xmlbeans.impl.schema.SchemaTypeImpl;
+import org.apache.geronimo.kernel.osgi.MockBundleContext;
+import org.osgi.framework.BundleContext;
+
+import org.osgi.framework.Bundle;
+
+/**
+ * @version $Rev:385232 $ $Date$
+ */
+public class JettyModuleBuilderTest extends TestSupport {
+
+    private static Naming naming = new Jsr77Naming();
+    private Artifact baseId = new Artifact("test", "base", "1", "car");
+    private final AbstractName serverName = naming.createRootName(baseId, "Server", "J2EEServer");
+
+    protected Kernel kernel;
+    private AbstractName tmName;
+    private AbstractName ctcName;
+    private Bundle bundle;
+    private JettyModuleBuilder builder;
+    private Artifact webModuleArtifact = new Artifact("foo", "bar", "1", "car");
+    private Environment defaultEnvironment = new Environment();
+    private ConfigurationManager configurationManager;
+    private ConfigurationStore configStore;
+
+    public void testDeployWar4() throws Exception {
+    /* TODO:  Temporarily disabled
+        String appName = "war4";
+        FakeEarBuilder fake = new FakeEarBuilder(appName);
+
+        assertEquals(State.RUNNING_INDEX, kernel.getGBeanState(fake.moduleName));
+        Set names = fake.configuration.findGBeans(new AbstractNameQuery(fake.moduleName.getArtifact(), Collections.EMPTY_MAP));
+        log.debug("names: " + names);
+        for (Iterator iterator = names.iterator(); iterator.hasNext();) {
+            AbstractName objectName = (AbstractName) iterator.next();
+            assertEquals(State.RUNNING_INDEX, kernel.getGBeanState(objectName));
+        }
+
+        configurationManager.stopConfiguration(fake.configurationId);
+        configurationManager.unloadConfiguration(fake.configurationId);
+      */
+    }
+
+    public void testContextRootWithSpaces() throws Exception {
+        /* TODO:  Temporarily disabled
+        String appName = "war-spaces-in-context";
+        FakeEarBuilder fake = new FakeEarBuilder(appName);
+
+
+        String contextRoot = (String) kernel.getAttribute(fake.moduleName, "contextPath");
+        assertNotNull(contextRoot);
+        assertEquals(contextRoot, contextRoot.trim());
+
+        configurationManager.stopConfiguration(fake.configurationId);
+        configurationManager.unloadConfiguration(fake.configurationId);
+        */
+    }
+
+    public void testDeployJaspiConfigProvider() throws Exception {
+        /* TODO:  Temporarily disabled
+        FakeEarBuilder fake = new FakeEarBuilder("jaspi1");
+
+        assertEquals(State.RUNNING_INDEX, kernel.getGBeanState(fake.moduleName));
+        Set names = fake.configuration.findGBeans(new AbstractNameQuery(fake.moduleName.getArtifact(), Collections.EMPTY_MAP));
+        log.debug("names: " + names);
+        for (Iterator iterator = names.iterator(); iterator.hasNext();) {
+            AbstractName objectName = (AbstractName) iterator.next();
+            assertEquals(State.RUNNING_INDEX, kernel.getGBeanState(objectName));
+        }
+
+        configurationManager.stopConfiguration(fake.configurationId);
+        configurationManager.unloadConfiguration(fake.configurationId);
+        */
+    }
+
+    private class FakeEarBuilder {
+        private AbstractName moduleName;
+        private Artifact configurationId;
+        private Configuration configuration;
+
+        private FakeEarBuilder(String appName) throws IOException, DeploymentException, LifecycleException, NoSuchConfigException {
+            File outputPath = new File(BASEDIR, "target/test-resources/deployables/" + appName);
+            recursiveDelete(outputPath);
+            outputPath.mkdirs();
+            new File(outputPath, "war").mkdir();
+            File path = new File(BASEDIR, "src/test/resources/deployables/" + appName);
+            UnpackedJarFile jarFile = new UnpackedJarFile(path);
+            Module module = builder.createModule(null, jarFile, kernel.getNaming(), new ModuleIDBuilder());
+            ListableRepository repository = null;
+
+            moduleName = module.getModuleName();
+            EARContext earContext = createEARContext(outputPath, defaultEnvironment, repository, configStore, moduleName);
+            module.setEarContext(earContext);
+            module.setRootEarContext(earContext);
+            builder.initContext(earContext, module, bundle);
+//            earContext.initializeConfiguration();
+            builder.addGBeans(earContext, module, bundle, Collections.EMPTY_SET);
+            ConfigurationData configurationData = earContext.getConfigurationData();
+            earContext.close();
+            module.close();
+
+            configurationId = configurationData.getId();
+            configurationManager.loadConfiguration(configurationData);
+            configuration = configurationManager.getConfiguration(configurationId);
+//            ((MockConfigStore)configStore).installFake(configurationId, outputPath);
+            configurationManager.startConfiguration(configurationId);
+        }
+    }
+
+    private EARContext createEARContext(File outputPath, Environment environment, ListableRepository repository, ConfigurationStore configStore, AbstractName moduleName) throws DeploymentException {
+        Set repositories = repository == null ? Collections.EMPTY_SET : Collections.singleton(repository);
+        ArtifactManager artifactManager = new DefaultArtifactManager();
+        ArtifactResolver artifactResolver = new DefaultArtifactResolver(artifactManager, repository);
+        return new EARContext(outputPath,
+                null,
+                environment,
+                ConfigurationModuleType.WAR,
+                naming,
+                configurationManager,
+                bundle.getBundleContext(),
+                new AbstractNameQuery(serverName),
+                moduleName,
+                new AbstractNameQuery(tmName),
+                new AbstractNameQuery(ctcName),
+                null
+        );
+    }
+
+    private void recursiveDelete(File path) {
+        //does not delete top level dir passed in
+        File[] listing = path.listFiles();
+        if (listing != null) {
+            for (int i = 0; i < listing.length; i++) {
+                File file = listing[i];
+                if (file.isDirectory()) {
+                    recursiveDelete(file);
+                }
+                file.delete();
+            }
+        }
+    }
+    protected void setUpSecurityService() throws Exception {
+        ServerInfo serverInfo = new BasicServerInfo(".");
+
+        new SecurityServiceImpl(this.getClass().getClassLoader(), serverInfo, GeronimoPolicyConfigurationFactory.class.getName(), GeronimoPolicy.class.getName(), null, null, null, null);
+    }
+
+    protected void setUp() throws Exception {
+        super.setUp();
+        bundle = new MockBundle(getClass().getClassLoader(), "test", 100);
+        setUpSecurityService();
+
+        ((SchemaTypeImpl) GerSecurityDocument.type).addSubstitutionGroupMember(org.apache.geronimo.xbeans.geronimo.security.GerSecurityDocument.type.getDocumentElementName());
+
+        kernel = KernelFactory.newInstance(bundle.getBundleContext()).createKernel("test");
+        kernel.boot();
+
+        ConfigurationData bootstrap = new ConfigurationData(baseId, naming);
+
+        GBeanData serverInfo = bootstrap.addGBean("ServerInfo", BasicServerInfo.class);
+        serverInfo.setAttribute("baseDirectory", ".");
+
+        AbstractName configStoreName = bootstrap.addGBean("MockConfigurationStore", MockConfigStore.GBEAN_INFO).getAbstractName();
+
+        GBeanData artifactManagerData = bootstrap.addGBean("ArtifactManager", DefaultArtifactManager.GBEAN_INFO);
+
+        GBeanData artifactResolverData = bootstrap.addGBean("ArtifactResolver", DefaultArtifactResolver.class);
+        artifactResolverData.setReferencePattern("ArtifactManager", artifactManagerData.getAbstractName());
+
+        GBeanData configurationManagerData = bootstrap.addGBean("ConfigurationManager", KernelConfigurationManager.class);
+        configurationManagerData.setReferencePattern("ArtifactManager", artifactManagerData.getAbstractName());
+        configurationManagerData.setReferencePattern("ArtifactResolver", artifactResolverData.getAbstractName());
+        configurationManagerData.setReferencePattern("Stores", configStoreName);
+        bootstrap.addGBean(configurationManagerData);
+
+        GBeanData serverData = new GBeanData(serverName, J2EEServerImpl.GBEAN_INFO);
+        bootstrap.addGBean(serverData);
+
+        Collection defaultServlets = new HashSet();
+        Collection defaultFilters = new HashSet();
+        Collection defaultFilterMappings = new HashSet();
+        Object pojoWebServiceTemplate = null;
+        WebServiceBuilder webServiceBuilder = new UnavailableWebServiceBuilder();
+
+        GBeanData containerData = bootstrap.addGBean("JettyContainer", JettyContainerImpl.class);
+        AbstractName containerName = containerData.getAbstractName();
+        containerData.setAttribute("jettyHome", new File(BASEDIR, "target/var/jetty").toString());
+        containerData.setReferencePattern("ServerInfo", serverInfo.getAbstractName());
+
+        GBeanData connector = bootstrap.addGBean("JettyConnector", HTTPSocketConnector.GBEAN_INFO);
+        connector.setAttribute("port", new Integer(5678));
+        connector.setAttribute("maxThreads", new Integer(50));
+//        connector.setAttribute("minThreads", new Integer(10));
+        connector.setReferencePattern("JettyContainer", containerName);
+
+        GBeanData tm = bootstrap.addGBean("TransactionManager", GeronimoTransactionManagerGBean.GBEAN_INFO);
+        tmName = tm.getAbstractName();
+        tm.setAttribute("defaultTransactionTimeoutSeconds", new Integer(10));
+
+        GBeanData ctc = bootstrap.addGBean("ConnectionTrackingCoordinator", ConnectionTrackingCoordinatorGBean.GBEAN_INFO);
+        ctcName = ctc.getAbstractName();
+        ctc.setReferencePattern("TransactionManager", tmName);
+
+        ConfigurationUtil.loadBootstrapConfiguration(kernel, bootstrap, new MockBundleContext(getClass().getClassLoader(), null, null, null));
+
+        configurationManager = ConfigurationUtil.getConfigurationManager(kernel);
+        configStore = (ConfigurationStore) kernel.getGBean(configStoreName);
+        configStore.install(bootstrap);
+
+        defaultEnvironment.addDependency(baseId, ImportType.ALL);
+        defaultEnvironment.setConfigId(webModuleArtifact);
+        Collection<ModuleBuilderExtension> moduleBuilderExtensions = new ArrayList<ModuleBuilderExtension>();
+        GeronimoSecurityBuilderImpl securityBuilder = new GeronimoSecurityBuilderImpl(null, null, null);
+        builder = new JettyModuleBuilder(defaultEnvironment,
+                new Integer(1800),
+                Collections.EMPTY_LIST,
+                new AbstractNameQuery(containerName),
+                //new AbstractNameQuery(containerName),
+                null, defaultServlets,
+                defaultFilters,
+                defaultFilterMappings,
+                null,
+                null,
+                pojoWebServiceTemplate,
+                Collections.singleton(webServiceBuilder),
+                null,
+                Arrays.asList(new GBeanBuilder(null, null), securityBuilder),
+                new NamingBuilderCollection(null),
+                moduleBuilderExtensions,
+                new MockResourceEnvironmentSetter(),
+                kernel);
+        builder.doStart();
+
+        securityBuilder.doStart();
+    }
+
+    protected void tearDown() throws Exception {
+        builder.doStop();
+        kernel.shutdown();
+        super.tearDown();
+    }
+
+}

Propchange: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/java/org/apache/geronimo/jetty8/deployment/JettyModuleBuilderTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/java/org/apache/geronimo/jetty8/deployment/JettyModuleBuilderTest.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/java/org/apache/geronimo/jetty8/deployment/JettyModuleBuilderTest.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/java/org/apache/geronimo/jetty8/deployment/MockResourceEnvironmentSetter.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/java/org/apache/geronimo/jetty8/deployment/MockResourceEnvironmentSetter.java?rev=882333&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/java/org/apache/geronimo/jetty8/deployment/MockResourceEnvironmentSetter.java (added)
+++ geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/java/org/apache/geronimo/jetty8/deployment/MockResourceEnvironmentSetter.java Thu Nov 19 22:21:48 2009
@@ -0,0 +1,31 @@
+/**
+ *  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.jetty8.deployment;
+
+import org.apache.geronimo.naming.deployment.ResourceEnvironmentBuilder;
+import org.apache.geronimo.naming.deployment.ResourceEnvironmentSetter;
+import org.apache.geronimo.xbeans.geronimo.naming.GerResourceRefType;
+import org.apache.xmlbeans.XmlObject;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class MockResourceEnvironmentSetter implements ResourceEnvironmentSetter {
+    public void setResourceEnvironment(ResourceEnvironmentBuilder builder, XmlObject[] resourceRefs, GerResourceRefType[] gerResourceRefs) {
+    }
+}

Propchange: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/java/org/apache/geronimo/jetty8/deployment/MockResourceEnvironmentSetter.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/java/org/apache/geronimo/jetty8/deployment/MockResourceEnvironmentSetter.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/java/org/apache/geronimo/jetty8/deployment/MockResourceEnvironmentSetter.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/java/org/apache/geronimo/jetty8/deployment/PlanParsingTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/java/org/apache/geronimo/jetty8/deployment/PlanParsingTest.java?rev=882333&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/java/org/apache/geronimo/jetty8/deployment/PlanParsingTest.java (added)
+++ geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/java/org/apache/geronimo/jetty8/deployment/PlanParsingTest.java Thu Nov 19 22:21:48 2009
@@ -0,0 +1,292 @@
+/**
+ *  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.jetty8.deployment;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Arrays;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.jar.JarFile;
+
+import org.apache.geronimo.deployment.service.GBeanBuilder;
+import org.apache.geronimo.deployment.util.DeploymentUtil;
+import org.apache.geronimo.deployment.util.UnpackedJarFile;
+import org.apache.geronimo.deployment.xbeans.ArtifactType;
+import org.apache.geronimo.deployment.xbeans.EnvironmentType;
+import org.apache.geronimo.deployment.xmlbeans.XmlBeansUtil;
+import org.apache.geronimo.deployment.NamespaceDrivenBuilder;
+import org.apache.geronimo.gbean.AbstractName;
+import org.apache.geronimo.gbean.AbstractNameQuery;
+import org.apache.geronimo.gbean.GBeanInfoBuilder;
+import org.apache.geronimo.j2ee.deployment.NamingBuilderCollection;
+import org.apache.geronimo.j2ee.deployment.WebServiceBuilder;
+import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
+import org.apache.geronimo.kernel.Jsr77Naming;
+import org.apache.geronimo.kernel.Naming;
+import org.apache.geronimo.kernel.repository.Artifact;
+import org.apache.geronimo.kernel.repository.Environment;
+import org.apache.geronimo.schema.SchemaConversionUtils;
+import org.apache.geronimo.security.deployment.GeronimoSecurityBuilderImpl;
+import org.apache.geronimo.testsupport.XmlBeansTestSupport;
+import org.apache.geronimo.web.deployment.GenericToSpecificPlanConverter;
+import org.apache.geronimo.xbeans.geronimo.naming.GerResourceRefType;
+import org.apache.geronimo.xbeans.geronimo.web.jetty.JettyWebAppDocument;
+import org.apache.geronimo.xbeans.geronimo.web.jetty.JettyWebAppType;
+import org.apache.geronimo.xbeans.geronimo.web.jetty.config.GerJettyDocument;
+import org.apache.geronimo.xbeans.javaee.WebAppDocument;
+import org.apache.geronimo.xbeans.javaee.WebAppType;
+import org.apache.xmlbeans.XmlCursor;
+import org.apache.xmlbeans.XmlException;
+import org.apache.xmlbeans.XmlObject;
+
+/**
+ */
+public class PlanParsingTest extends XmlBeansTestSupport {
+
+    private ClassLoader classLoader = this.getClass().getClassLoader();
+
+    private Naming naming = new Jsr77Naming();
+    private Artifact baseId = new Artifact("test", "base", "1", "car");
+    private AbstractName baseRootName = naming.createRootName(baseId, "root", NameFactory.SERVICE_MODULE);
+    private AbstractNameQuery jettyContainerObjectName = new AbstractNameQuery(naming.createChildName(baseRootName, "jettyContainer", GBeanInfoBuilder.DEFAULT_J2EE_TYPE));
+    private AbstractNameQuery credentialStoreName = new AbstractNameQuery(naming.createChildName(baseRootName, "CredentialStore", GBeanInfoBuilder.DEFAULT_J2EE_TYPE));
+    private AbstractName pojoWebServiceTemplate = null;
+    private WebServiceBuilder webServiceBuilder = null;
+    private Environment defaultEnvironment = new Environment();
+    private JettyModuleBuilder builder;
+    private AtomicBoolean isDefault = new AtomicBoolean(false);
+
+    protected void setUp() throws Exception {
+        super.setUp();
+        GeronimoSecurityBuilderImpl securityBuilder = new GeronimoSecurityBuilderImpl(null, null, null);
+        builder = new JettyModuleBuilder(defaultEnvironment,
+                new Integer(1800),
+                null,
+                jettyContainerObjectName,
+                null, new HashSet(),
+                new HashSet(),
+                new HashSet(),
+                null,
+                null,
+                pojoWebServiceTemplate,
+                Collections.singleton(webServiceBuilder),
+                null,
+                Arrays.asList(new GBeanBuilder(null, null), securityBuilder),
+                new NamingBuilderCollection(null),
+                null,
+                new MockResourceEnvironmentSetter(),
+                null);
+        builder.doStart();
+        securityBuilder.doStart();
+    }
+
+    protected void tearDown() throws Exception {
+        super.tearDown();
+        builder.doStop();
+    }
+
+    public void testContents() throws Exception {
+        URL resourcePlan = classLoader.getResource("plans/plan1.xml");
+        assertTrue(resourcePlan != null);
+        JettyWebAppType jettyWebApp = builder.getJettyWebApp(new File(resourcePlan.getFile()), null, true, null, null);
+        assertEquals(1, jettyWebApp.getResourceRefArray().length);
+//        assertEquals(4, jettyWebApp.getSecurity().getRoleMappings().getRoleArray().length);
+    }
+
+    public void testMoveSecurity1() throws Exception {
+        URL resourcePlan = classLoader.getResource("plans/plan1A.xml");
+        assertTrue(resourcePlan != null);
+        JettyWebAppType jettyWebApp = builder.getJettyWebApp(new File(resourcePlan.getFile()), null, true, null, null);
+        assertEquals(1, jettyWebApp.getResourceRefArray().length);
+//        assertEquals(4, jettyWebApp.getSecurity().getRoleMappings().getRoleArray().length);
+    }
+
+    public void testMoveSecurity2() throws Exception {
+        URL resourcePlan = classLoader.getResource("plans/plan1B.xml");
+        assertTrue(resourcePlan != null);
+        JettyWebAppType jettyWebApp = builder.getJettyWebApp(new File(resourcePlan.getFile()), null, true, null, null);
+        assertEquals(1, jettyWebApp.getResourceRefArray().length);
+//        assertEquals(4, jettyWebApp.getSecurity().getRoleMappings().getRoleArray().length);
+    }
+
+    public void testMoveSecurity3() throws Exception {
+        URL resourcePlan = classLoader.getResource("plans/plan1C.xml");
+        assertTrue(resourcePlan != null);
+        JettyWebAppType jettyWebApp = builder.getJettyWebApp(new File(resourcePlan.getFile()), null, true, null, null);
+//        assertEquals(4, jettyWebApp.getSecurity().getRoleMappings().getRoleArray().length);
+//        log.debug(jettyWebApp.xmlText());
+    }
+
+    public void testOldFormat() throws Exception {
+        URL resourcePlan = classLoader.getResource("plans/plan2.xml");
+        assertTrue(resourcePlan != null);
+        JettyWebAppType jettyWebApp = builder.getJettyWebApp(new File(resourcePlan.getFile()), null, true, null, null);
+        assertEquals(1, jettyWebApp.getResourceRefArray().length);
+//        assertEquals(4, jettyWebApp.getSecurity().getRoleMappings().getRoleArray().length);
+    }
+
+    public void testConvertPlan() throws Exception {
+        URL srcXml = classLoader.getResource("plans/plan-convert.xml");
+        XmlObject rawPlan = XmlBeansUtil.parse(srcXml, getClass().getClassLoader());
+
+        XmlObject webPlan = new GenericToSpecificPlanConverter(
+                "http://geronimo.apache.org/xml/ns/web/jetty/config-1.0.1",
+                "http://geronimo.apache.org/xml/ns/j2ee/web/jetty-2.0.2", 
+                "jetty").convertToSpecificPlan(rawPlan);
+        
+        XmlObject p = webPlan.changeType(JettyWebAppType.type);
+        XmlBeansUtil.validateDD(p);
+    }
+    
+    public void testOldFormatExploded() throws Exception {
+        URL war = classLoader.getResource("deployables/war5");
+        assertTrue(war != null);
+        UnpackedJarFile moduleFile = new UnpackedJarFile(new File(war.getFile()));
+        JettyWebAppType jettyWebApp = builder.getJettyWebApp(null, moduleFile, true, null, null);
+        moduleFile.close();
+        assertEquals(1, jettyWebApp.getResourceRefArray().length);
+    }
+
+    public void XtestOldFormatPackaged() throws Exception {
+        URL war = classLoader.getResource("deployables/war6.war");
+        assertTrue(war != null);
+        JarFile moduleFile = new JarFile(new File(war.getFile()));
+        JettyWebAppType jettyWebApp = builder.getJettyWebApp(null, moduleFile, true, null, null);
+        moduleFile.close();
+        assertEquals(1, jettyWebApp.getResourceRefArray().length);
+    }
+
+    public void testConstructPlan() throws Exception {
+        JettyWebAppDocument jettyWebAppDoc = JettyWebAppDocument.Factory.newInstance();
+        JettyWebAppType webApp = jettyWebAppDoc.addNewWebApp();
+        addEnvironment(webApp);
+        GerResourceRefType ref = webApp.addNewResourceRef();
+        ref.setRefName("ref");
+        ref.setResourceLink("target");
+
+        XmlBeansUtil.validateDD(webApp);
+        log.debug(webApp.toString());
+    }
+
+    private void addEnvironment(JettyWebAppType webApp) {
+        EnvironmentType environmentType = webApp.addNewEnvironment();
+        ArtifactType configId = environmentType.addNewModuleId();
+        configId.setGroupId("g");
+        configId.setArtifactId("a");
+        configId.setVersion("1");
+        configId.setType("car");
+    }
+
+    /**
+     * This test has 2 purposes: one the obvious one explicitly tested,
+     * the other that passing a JettyWebAppType XmlObject in works.  This latter
+     * models a web-app element inside an ear plan.
+     *
+     * @throws Exception
+     */
+    public void testContextRootWithPlanAndContextSet() throws Exception {
+
+        JettyWebAppDocument jettyWebAppDoc = JettyWebAppDocument.Factory.newInstance();
+        JettyWebAppType webApp = jettyWebAppDoc.addNewWebApp();
+        addEnvironment(webApp);
+        webApp.setContextRoot("myContextRoot");
+
+        URL war = classLoader.getResource("deployables/war2.war");
+        assertTrue(war != null);
+        JarFile dummyFile = new JarFile(new File(war.getFile()));
+
+        webApp = builder.getJettyWebApp(webApp, dummyFile, true, null, null);
+
+        assertEquals("myContextRoot", webApp.getContextRoot());
+
+    }
+
+    public void testContextRootWithoutPlanStandAlone() throws Exception {
+
+        URL war = classLoader.getResource("deployables/war2.war");
+        assertTrue(war != null);
+        JarFile dummyFile = new JarFile(new File(war.getFile()));
+        JettyWebAppType GerWebAppType = builder.getJettyWebApp(null, dummyFile, true, null, null);
+        WebAppType webApp = getWebApp(dummyFile);
+        String contextRoot = builder.getContextRoot(GerWebAppType, null, webApp, true, dummyFile, null);
+
+        assertEquals("/war2", contextRoot);
+
+    }
+
+    public void testContextRootWithoutPlanAndTargetPath() throws Exception {
+
+        URL war = classLoader.getResource("deployables/war2.war");
+        assertTrue(war != null);
+        JarFile dummyFile = new JarFile(new File(war.getFile()));
+        JettyWebAppType GerWebAppType = builder.getJettyWebApp(null, dummyFile, false, "myTargetPath", null);
+        WebAppType webApp = getWebApp(dummyFile);
+        String contextRoot = builder.getContextRoot(GerWebAppType, null, webApp, false, dummyFile, "myTargetPath");
+        assertEquals("myTargetPath", contextRoot);
+
+    }
+
+    public void testContextRootWithoutPlanButWebApp() throws Exception {
+
+        WebAppDocument webAppDocument = WebAppDocument.Factory.newInstance();
+        WebAppType webAppType = webAppDocument.addNewWebApp();
+        webAppType.setId("myId");
+
+        URL war = classLoader.getResource("deployables/war2.war");
+        assertTrue(war != null);
+        JarFile dummyFile = new JarFile(new File(war.getFile()));
+        JettyWebAppType GerWebAppType = builder.getJettyWebApp(null, dummyFile, false, "myTargetPath", webAppType);
+//        WebAppType webApp = getWebApp(dummyFile);
+        String contextRoot = builder.getContextRoot(GerWebAppType, null, webAppType, false, dummyFile, "myTargetPath");
+
+        assertEquals("myId", contextRoot);
+
+    }
+
+    private WebAppType getWebApp(JarFile dummyFile) throws IOException, XmlException {
+        URL specDDUrl = DeploymentUtil.createJarURL(dummyFile, "WEB-INF/web.xml");
+        XmlObject parsed = XmlBeansUtil.parse(specDDUrl, getClass().getClassLoader());
+        WebAppDocument webAppDoc = (WebAppDocument) parsed.changeType(WebAppDocument.type);
+        return webAppDoc.getWebApp();
+    }
+
+    public void testParseSpecDD() {
+
+    }
+
+    public void xtestConvertToJettySchema() throws Exception {
+        URL resourcePlan = classLoader.getResource("plans/plan4.xml");
+        assertTrue(resourcePlan != null);
+        XmlObject rawPlan = XmlBeansUtil.parse(resourcePlan, getClass().getClassLoader());
+        XmlObject webPlan = new GenericToSpecificPlanConverter(GerJettyDocument.type.getDocumentElementName().getNamespaceURI(),
+                JettyWebAppDocument.type.getDocumentElementName().getNamespaceURI(), "jetty").convertToSpecificPlan(rawPlan);
+        URL ConvertedPlan = classLoader.getResource("plans/plan4-converted.xml");
+        assertTrue(ConvertedPlan != null);
+        XmlObject converted = XmlBeansUtil.parse(ConvertedPlan, getClass().getClassLoader());
+        XmlCursor c = converted.newCursor();
+        SchemaConversionUtils.findNestedElement(c, JettyWebAppDocument.type.getDocumentElementName());
+        c.toFirstChild();
+        ArrayList problems = new ArrayList();
+        compareXmlObjects(webPlan, c.getObject(), problems);
+        assertEquals("problems: " + problems, 0, problems.size());
+    }
+
+}

Propchange: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/java/org/apache/geronimo/jetty8/deployment/PlanParsingTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/java/org/apache/geronimo/jetty8/deployment/PlanParsingTest.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/java/org/apache/geronimo/jetty8/deployment/PlanParsingTest.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/java/org/apache/geronimo/jetty8/deployment/StartupOrderComparatorTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/java/org/apache/geronimo/jetty8/deployment/StartupOrderComparatorTest.java?rev=882333&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/java/org/apache/geronimo/jetty8/deployment/StartupOrderComparatorTest.java (added)
+++ geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/java/org/apache/geronimo/jetty8/deployment/StartupOrderComparatorTest.java Thu Nov 19 22:21:48 2009
@@ -0,0 +1,83 @@
+/**
+ *  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.jetty8.deployment;
+
+import junit.framework.TestCase;
+import org.apache.geronimo.xbeans.javaee.ServletType;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class StartupOrderComparatorTest extends TestCase {
+
+    private final JettyModuleBuilder.StartupOrderComparator c = new JettyModuleBuilder.StartupOrderComparator();
+
+    public void testNoOrders() throws Exception {
+        ServletType s1 = makeServletType("a", -1);
+        ServletType s2 = makeServletType("b", -1);
+        ServletType s3 = makeServletType("c", -1);
+        checkOrdering(s1, s2, s3);
+    }
+
+    public void testIdenticalOrders() throws Exception {
+        ServletType s1 = makeServletType("a", 1);
+        ServletType s2 = makeServletType("b", 1);
+        ServletType s3 = makeServletType("c", 1);
+        checkOrdering(s1, s2, s3);
+    }
+
+    public void testDistinctOrders() throws Exception {
+        ServletType s1 = makeServletType("c", 1);
+        ServletType s2 = makeServletType("b", 2);
+        ServletType s3 = makeServletType("a", 3);
+        checkOrdering(s1, s2, s3);
+    }
+
+    public void testMixedOrders1() throws Exception {
+        ServletType s1 = makeServletType("c", 1);
+        ServletType s2 = makeServletType("b", 2);
+        ServletType s3 = makeServletType("a", -1);
+        checkOrdering(s1, s2, s3);
+    }
+
+    public void testMixedOrders2() throws Exception {
+        ServletType s1 = makeServletType("c", 1);
+        ServletType s2 = makeServletType("a", -1);
+        ServletType s3 = makeServletType("b", -1);
+        checkOrdering(s1, s2, s3);
+    }
+
+    private void checkOrdering(ServletType s1, ServletType s2, ServletType s3) {
+        //symmetric
+        assertTrue(c.compare(s1, s2) < 0);
+        assertTrue(c.compare(s2, s1) > 0);
+        //reflexive
+        assertTrue(c.compare(s1, s1) == 0);
+        //transitive
+        assertTrue(c.compare(s2, s3) < 0);
+        assertTrue(c.compare(s1, s3) < 0);
+    }
+
+    private ServletType makeServletType(String servletName, int order) {
+        ServletType s1 = ServletType.Factory.newInstance();
+        s1.addNewServletName().setStringValue(servletName);
+        if (order > -1) {
+            s1.setLoadOnStartup(Integer.valueOf(order));
+        }
+        return s1;
+    }
+}

Propchange: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/java/org/apache/geronimo/jetty8/deployment/StartupOrderComparatorTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/java/org/apache/geronimo/jetty8/deployment/StartupOrderComparatorTest.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/java/org/apache/geronimo/jetty8/deployment/StartupOrderComparatorTest.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/resources/data/groups.properties
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/resources/data/groups.properties?rev=882333&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/resources/data/groups.properties (added)
+++ geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/resources/data/groups.properties Thu Nov 19 22:21:48 2009
@@ -0,0 +1,23 @@
+##
+##
+##   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.
+##
+
+manager=izumi
+it=alan
+pet=george,gracie,metro
+dog=george,gracie
+cat=metro
\ No newline at end of file

Propchange: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/resources/data/groups.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/resources/data/groups.properties
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/resources/data/groups.properties
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/resources/data/login.config
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/resources/data/login.config?rev=882333&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/resources/data/login.config (added)
+++ geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/resources/data/login.config Thu Nov 19 22:21:48 2009
@@ -0,0 +1,25 @@
+/**
+ *  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.
+ */
+
+jaasTest {
+    org.apache.geronimo.security.jaas.LocalLoginModule required
+    debug=true
+    realm="demo-properties-realm"
+    kernel="geronimo.kernel";
+};
+
+

Added: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/resources/data/users.properties
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/resources/data/users.properties?rev=882333&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/resources/data/users.properties (added)
+++ geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/resources/data/users.properties Thu Nov 19 22:21:48 2009
@@ -0,0 +1,23 @@
+##
+##
+##   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.
+##
+
+izumi=violin
+alan=starcraft
+george=bone
+gracie=biscuit
+metro=mouse
\ No newline at end of file

Propchange: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/resources/data/users.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/resources/data/users.properties
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/resources/data/users.properties
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/resources/deployables/cltest/javax/foo/Foo.class
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/resources/deployables/cltest/javax/foo/Foo.class?rev=882333&view=auto
==============================================================================
Binary file - no diff available.

Propchange: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/resources/deployables/cltest/javax/foo/Foo.class
------------------------------------------------------------------------------
    svn:mime-type = application/java

Added: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/resources/deployables/cltest/javax/servlet/Servlet.class
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/resources/deployables/cltest/javax/servlet/Servlet.class?rev=882333&view=auto
==============================================================================
Binary file - no diff available.

Propchange: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/resources/deployables/cltest/javax/servlet/Servlet.class
------------------------------------------------------------------------------
    svn:mime-type = application/java

Added: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/resources/deployables/cltest/mx4j/MBeanDescription.class
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/resources/deployables/cltest/mx4j/MBeanDescription.class?rev=882333&view=auto
==============================================================================
Binary file - no diff available.

Propchange: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/resources/deployables/cltest/mx4j/MBeanDescription.class
------------------------------------------------------------------------------
    svn:mime-type = application/java

Added: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/resources/deployables/jaspi1/WEB-INF/geronimo-web.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/resources/deployables/jaspi1/WEB-INF/geronimo-web.xml?rev=882333&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/resources/deployables/jaspi1/WEB-INF/geronimo-web.xml (added)
+++ geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/resources/deployables/jaspi1/WEB-INF/geronimo-web.xml Thu Nov 19 22:21:48 2009
@@ -0,0 +1,69 @@
+<?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.
+-->
+
+<jetty:web-app
+    xmlns:jetty="http://geronimo.apache.org/xml/ns/j2ee/web/jetty-2.0.2"
+    xmlns:sec="http://geronimo.apache.org/xml/ns/security-1.1">
+    <environment>
+        <moduleId>
+            <groupId>foo</groupId>
+            <artifactId>bar</artifactId>
+            <version>1</version>
+            <type>car</type>
+        </moduleId>
+    </environment>
+
+    <jetty:context-root>/test</jetty:context-root>
+    <jetty:security-realm-name>demo-properties-realm</jetty:security-realm-name>
+    <jetty:authentication>
+        <configProvider xmlns="http://geronimo.apache.org/xml/ns/geronimo-jaspi">
+            <messageLayer>Http</messageLayer>
+            <appContext>test-app1</appContext>
+            <description>description</description>
+            <clientAuthConfig>
+                <authenticationContextID>authenticationContextID1</authenticationContextID>
+                <protected>true</protected>
+                <clientAuthContext>
+                    <clientAuthModule>
+                        <className>org.apache.geronimo.components.jaspi.providers.DummyClientAuthModule</className>
+                    </clientAuthModule>
+                </clientAuthContext>
+            </clientAuthConfig>
+            <serverAuthConfig>
+                <authenticationContextID>authenticationContextID2</authenticationContextID>
+                <protected>true</protected>
+                <serverAuthContext>
+                    <serverAuthModule>
+                        <className>org.apache.geronimo.components.jaspi.providers.DummyServerAuthModule</className>
+                    </serverAuthModule>
+                </serverAuthContext>
+            </serverAuthConfig>
+            <persistent>true</persistent>
+        </configProvider>
+    </jetty:authentication>
+    <sec:security>
+        <sec:default-principal>
+            <sec:principal class="org.apache.geronimo.security.realm.providers.PropertiesFileUserPrincipal" name="izumi"/>
+        </sec:default-principal>
+    </sec:security>
+
+    <gbean name="demo-properties-realm" class="org.apache.geronimo.security.realm.GenericSecurityRealm">
+        <attribute name="realmName">demo-properties-realm</attribute>
+    </gbean>
+</jetty:web-app>

Propchange: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/resources/deployables/jaspi1/WEB-INF/geronimo-web.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/resources/deployables/jaspi1/WEB-INF/geronimo-web.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/resources/deployables/jaspi1/WEB-INF/geronimo-web.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/resources/deployables/jaspi1/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/resources/deployables/jaspi1/WEB-INF/web.xml?rev=882333&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/resources/deployables/jaspi1/WEB-INF/web.xml (added)
+++ geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/resources/deployables/jaspi1/WEB-INF/web.xml Thu Nov 19 22:21:48 2009
@@ -0,0 +1,56 @@
+<?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.
+-->
+  
+<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
+
+<web-app>
+    <description>Test Web Deployment</description>
+
+    <security-constraint>
+        <web-resource-collection>
+            <web-resource-name>Admin Role</web-resource-name>
+            <url-pattern>/protected/*</url-pattern>
+        </web-resource-collection>
+        <auth-constraint>
+            <role-name>content-administrator</role-name>
+        </auth-constraint>
+    </security-constraint>
+
+    <security-constraint>
+        <web-resource-collection>
+            <web-resource-name>NO ACCESS</web-resource-name>
+            <url-pattern>/auth/logon.html</url-pattern>
+        </web-resource-collection>
+        <auth-constraint/>
+    </security-constraint>
+
+    <login-config>
+        <auth-method>FORM</auth-method>
+        <realm-name>Test JAAS Realm</realm-name>
+        <form-login-config>
+            <form-login-page>/auth/logon.html?param=test</form-login-page>
+            <form-error-page>/auth/logonError.html?param=test</form-error-page>
+        </form-login-config>
+    </login-config>
+
+    <security-role>
+        <role-name>content-administrator</role-name>
+    </security-role>
+
+</web-app>

Propchange: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/resources/deployables/jaspi1/WEB-INF/web.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/resources/deployables/jaspi1/WEB-INF/web.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/resources/deployables/jaspi1/WEB-INF/web.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/resources/deployables/jaspi1/hello.txt
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/resources/deployables/jaspi1/hello.txt?rev=882333&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/resources/deployables/jaspi1/hello.txt (added)
+++ geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/resources/deployables/jaspi1/hello.txt Thu Nov 19 22:21:48 2009
@@ -0,0 +1 @@
+Hello World

Propchange: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/resources/deployables/jaspi1/hello.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/resources/deployables/jaspi1/hello.txt
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/resources/deployables/jaspi1/hello.txt
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/resources/deployables/war-spaces-in-context/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/resources/deployables/war-spaces-in-context/META-INF/MANIFEST.MF?rev=882333&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/resources/deployables/war-spaces-in-context/META-INF/MANIFEST.MF (added)
+++ geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/resources/deployables/war-spaces-in-context/META-INF/MANIFEST.MF Thu Nov 19 22:21:48 2009
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Created-By: 1.5.0_06 (Sun Microsystems Inc.)
+

Added: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/resources/deployables/war-spaces-in-context/WEB-INF/geronimo-web.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/resources/deployables/war-spaces-in-context/WEB-INF/geronimo-web.xml?rev=882333&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/resources/deployables/war-spaces-in-context/WEB-INF/geronimo-web.xml (added)
+++ geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/resources/deployables/war-spaces-in-context/WEB-INF/geronimo-web.xml Thu Nov 19 22:21:48 2009
@@ -0,0 +1,34 @@
+<?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.
+-->
+<web-app
+	xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.1"
+	xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.1"
+	xmlns:naming="http://geronimo.apache.org/xml/ns/naming-1.1"
+	xmlns:security="http://geronimo.apache.org/xml/ns/security-1.1"
+	>
+	<environment>
+		<moduleId>
+			<groupId>contextRootTest</groupId>
+			<artifactId>spacesInContext</artifactId>
+		</moduleId>
+	</environment>
+	
+	<context-root>
+        test-spaces
+    </context-root>
+</web-app>

Propchange: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/resources/deployables/war-spaces-in-context/WEB-INF/geronimo-web.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/resources/deployables/war-spaces-in-context/WEB-INF/geronimo-web.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/resources/deployables/war-spaces-in-context/WEB-INF/geronimo-web.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/resources/deployables/war-spaces-in-context/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/resources/deployables/war-spaces-in-context/WEB-INF/web.xml?rev=882333&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/resources/deployables/war-spaces-in-context/WEB-INF/web.xml (added)
+++ geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/resources/deployables/war-spaces-in-context/WEB-INF/web.xml Thu Nov 19 22:21:48 2009
@@ -0,0 +1,25 @@
+<?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.
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
+	 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	 xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
+	 http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
+	 version="2.4">
+	
+</web-app>

Propchange: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/resources/deployables/war-spaces-in-context/WEB-INF/web.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/resources/deployables/war-spaces-in-context/WEB-INF/web.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/resources/deployables/war-spaces-in-context/WEB-INF/web.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/resources/deployables/war-spaces-in-context/index.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/resources/deployables/war-spaces-in-context/index.jsp?rev=882333&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/resources/deployables/war-spaces-in-context/index.jsp (added)
+++ geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/resources/deployables/war-spaces-in-context/index.jsp Thu Nov 19 22:21:48 2009
@@ -0,0 +1,22 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--
+  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.
+-->
+
+<html>
+    <head><title>WAR Test - Spaces in Context Root</title></head>
+    <body><p>Testing WAR with spaces in its context root.</p></body>
+</html>

Propchange: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/resources/deployables/war-spaces-in-context/index.jsp
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/resources/deployables/war-spaces-in-context/index.jsp
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/resources/deployables/war-spaces-in-context/index.jsp
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/resources/deployables/war1/WEB-INF/geronimo-web.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/resources/deployables/war1/WEB-INF/geronimo-web.xml?rev=882333&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/resources/deployables/war1/WEB-INF/geronimo-web.xml (added)
+++ geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/resources/deployables/war1/WEB-INF/geronimo-web.xml Thu Nov 19 22:21:48 2009
@@ -0,0 +1,41 @@
+<?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.
+-->
+
+<jetty:web-app
+    xmlns:jetty="http://geronimo.apache.org/xml/ns/j2ee/web-1.1">
+    <environment>
+        <moduleId>
+            <groupId>foo</groupId>
+            <artifactId>bar</artifactId>
+            <version>1</version>
+            <type>car</type>
+        </moduleId>
+    </environment>
+
+    <jetty:context-root>/test</jetty:context-root>
+    <jetty:work-dir>myworkdir</jetty:work-dir>
+    <!--
+        <jetty:security>
+            <sec:default-principal>
+                <sec:principal class="org.apache.geronimo.security.DefaultPrincipal"
+                    name="bar"/>
+            </sec:default-principal>
+        </jetty:security>
+    -->
+</jetty:web-app>



Mime
View raw message