Author: struberg
Date: Mon Sep 24 22:10:06 2012
New Revision: 1389623

URL: http://svn.apache.org/viewvc?rev=1389623&view=rev
Log:
OWB-705 add IT for webbeans-tomcat7 module

start the ITs with mvn ... -Prun-its

Added:
    openwebbeans/trunk/webbeans-tomcat7/src/it/
    openwebbeans/trunk/webbeans-tomcat7/src/it/servletinjection/
    openwebbeans/trunk/webbeans-tomcat7/src/it/servletinjection/pom.xml
    openwebbeans/trunk/webbeans-tomcat7/src/it/servletinjection/src/
    openwebbeans/trunk/webbeans-tomcat7/src/it/servletinjection/src/main/
    openwebbeans/trunk/webbeans-tomcat7/src/it/servletinjection/src/main/java/
    
openwebbeans/trunk/webbeans-tomcat7/src/it/servletinjection/src/main/java/org/
    
openwebbeans/trunk/webbeans-tomcat7/src/it/servletinjection/src/main/java/org/apache/
    
openwebbeans/trunk/webbeans-tomcat7/src/it/servletinjection/src/main/java/org/apache/webbeans/
    
openwebbeans/trunk/webbeans-tomcat7/src/it/servletinjection/src/main/java/org/apache/webbeans/web/
    
openwebbeans/trunk/webbeans-tomcat7/src/it/servletinjection/src/main/java/org/apache/webbeans/web/tomcat7/
    
openwebbeans/trunk/webbeans-tomcat7/src/it/servletinjection/src/main/java/org/apache/webbeans/web/tomcat7/test/
    
openwebbeans/trunk/webbeans-tomcat7/src/it/servletinjection/src/main/java/org/apache/webbeans/web/tomcat7/test/TestBean.java
   (with props)
    
openwebbeans/trunk/webbeans-tomcat7/src/it/servletinjection/src/main/java/org/apache/webbeans/web/tomcat7/test/TestServlet.java
   (with props)
    openwebbeans/trunk/webbeans-tomcat7/src/it/servletinjection/src/main/webapp/
    
openwebbeans/trunk/webbeans-tomcat7/src/it/servletinjection/src/main/webapp/WEB-INF/
    
openwebbeans/trunk/webbeans-tomcat7/src/it/servletinjection/src/main/webapp/WEB-INF/web.xml
   (with props)
    openwebbeans/trunk/webbeans-tomcat7/src/it/settings.xml   (with props)
    openwebbeans/trunk/webbeans-tomcat7/src/test/java/org/
    openwebbeans/trunk/webbeans-tomcat7/src/test/java/org/apache/
    openwebbeans/trunk/webbeans-tomcat7/src/test/java/org/apache/webbeans/
    openwebbeans/trunk/webbeans-tomcat7/src/test/java/org/apache/webbeans/web/
    
openwebbeans/trunk/webbeans-tomcat7/src/test/java/org/apache/webbeans/web/tomcat/
    
openwebbeans/trunk/webbeans-tomcat7/src/test/java/org/apache/webbeans/web/tomcat/test/
    
openwebbeans/trunk/webbeans-tomcat7/src/test/java/org/apache/webbeans/web/tomcat/test/OwbTomcatPluginIT.java
Modified:
    openwebbeans/trunk/pom.xml
    openwebbeans/trunk/webbeans-tomcat7/pom.xml
    
openwebbeans/trunk/webbeans-tomcat7/src/main/java/org/apache/webbeans/web/tomcat/ContextLifecycleListener.java

Modified: openwebbeans/trunk/pom.xml
URL: 
http://svn.apache.org/viewvc/openwebbeans/trunk/pom.xml?rev=1389623&r1=1389622&r2=1389623&view=diff
==============================================================================
--- openwebbeans/trunk/pom.xml (original)
+++ openwebbeans/trunk/pom.xml Mon Sep 24 22:10:06 2012
@@ -260,7 +260,6 @@
                     <artifactId>maven-jar-plugin</artifactId>
                     <version>2.3.2</version>
                 </plugin>
-
             </plugins>
         </pluginManagement>
 

Modified: openwebbeans/trunk/webbeans-tomcat7/pom.xml
URL: 
http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-tomcat7/pom.xml?rev=1389623&r1=1389622&r2=1389623&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-tomcat7/pom.xml (original)
+++ openwebbeans/trunk/webbeans-tomcat7/pom.xml Mon Sep 24 22:10:06 2012
@@ -66,5 +66,43 @@
         </dependency>
 
     </dependencies>
-    
+
+
+    <profiles>
+        <profile>
+            <id>run-its</id>
+            <build>
+                <plugins>
+                    <!-- invoke the integration tests under src/it -->
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-invoker-plugin</artifactId>
+                        <configuration>
+                            <debug>true</debug>
+                            <projectsDirectory>src/it</projectsDirectory>
+                            
<cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
+                            
<localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
+                            <settingsFile>src/it/settings.xml</settingsFile>
+                            <pomIncludes>
+                                <pomInclude>*/pom.xml</pomInclude>
+                            </pomIncludes>
+                            <goals>
+                                <goal>install</goal>
+                            </goals>
+                        </configuration>
+                        <executions>
+                            <execution>
+                                <id>integration-test</id>
+                                <goals>
+                                    <goal>install</goal>
+                                    <goal>run</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+
 </project>

Added: openwebbeans/trunk/webbeans-tomcat7/src/it/servletinjection/pom.xml
URL: 
http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-tomcat7/src/it/servletinjection/pom.xml?rev=1389623&view=auto
==============================================================================
--- openwebbeans/trunk/webbeans-tomcat7/src/it/servletinjection/pom.xml (added)
+++ openwebbeans/trunk/webbeans-tomcat7/src/it/servletinjection/pom.xml Mon Sep 
24 22:10:06 2012
@@ -0,0 +1,275 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";>
+    <!--
+
+        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.
+    -->
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.openwebbeans</groupId>
+        <artifactId>openwebbeans</artifactId>
+        <version>@project.version@</version>
+    </parent>
+
+    <groupId>org.apache.openwebbeans.it</groupId>
+    <artifactId>openwebbeans-tomcat7-it-servletinjection</artifactId>
+    <version>@project.version@</version>
+    <packaging>war</packaging>
+    <name>Tomcat 7 plugin IT</name>
+
+    <properties>
+        <tomcat.port.it>9081</tomcat.port.it>
+        <tomcat7.version>7.0.30</tomcat7.version>
+        <jstl.version>1.2</jstl.version>
+        <projectStage>Development</projectStage>
+    </properties>
+
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.tomcat</groupId>
+            <artifactId>tomcat-catalina</artifactId>
+            <version>7.0.0</version>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.openwebbeans</groupId>
+            <artifactId>openwebbeans-spi</artifactId>
+            <version>@project.version@</version>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.openwebbeans</groupId>
+            <artifactId>openwebbeans-impl</artifactId>
+            <version>@project.version@</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.openwebbeans</groupId>
+            <artifactId>openwebbeans-web</artifactId>
+            <version>@project.version@</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.openwebbeans</groupId>
+            <artifactId>openwebbeans-tomcat7</artifactId>
+            <version>@project.version@</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-jcdi_1.0_spec</artifactId>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-atinject_1.0_spec</artifactId>
+            <scope>provided</scope>
+        </dependency>
+
+    </dependencies>
+
+    <build>
+        <pluginManagement>
+            <plugins>
+                <plugin>
+                    <!-- needed for the tomcat7 integration tests -->
+                    <groupId>org.apache.tomcat.maven</groupId>
+                    <artifactId>tomcat7-maven-plugin</artifactId>
+                    <version>2.0-beta-1</version>
+                    <dependencies>
+                        <dependency>
+                            <groupId>jstl</groupId>
+                            <artifactId>jstl</artifactId>
+                            <version>${jstl.version}</version>
+                        </dependency>
+
+                        <!--
+                            tomcat7-maven-plugin dependencies
+                            We need to add those for specifying the version
+                        -->
+                        <dependency>
+                            <groupId>org.apache.tomcat.embed</groupId>
+                            <artifactId>tomcat-embed-core</artifactId>
+                            <version>${tomcat7.version}</version>
+                        </dependency>
+                        <dependency>
+                            <groupId>org.apache.tomcat</groupId>
+                            <artifactId>tomcat-util</artifactId>
+                            <version>${tomcat7.version}</version>
+                        </dependency>
+                        <dependency>
+                            <groupId>org.apache.tomcat</groupId>
+                            <artifactId>tomcat-coyote</artifactId>
+                            <version>${tomcat7.version}</version>
+                        </dependency>
+                        <dependency>
+                            <groupId>org.apache.tomcat</groupId>
+                            <artifactId>tomcat-api</artifactId>
+                            <version>${tomcat7.version}</version>
+                        </dependency>
+
+                        <dependency>
+                            <groupId>org.apache.tomcat</groupId>
+                            <artifactId>tomcat-jdbc</artifactId>
+                            <version>${tomcat7.version}</version>
+                        </dependency>
+
+                        <dependency>
+                            <groupId>org.apache.tomcat</groupId>
+                            <artifactId>tomcat-dbcp</artifactId>
+                            <version>${tomcat7.version}</version>
+                        </dependency>
+
+                        <dependency>
+                            <groupId>org.apache.tomcat</groupId>
+                            <artifactId>tomcat-servlet-api</artifactId>
+                            <version>${tomcat7.version}</version>
+                        </dependency>
+
+                        <dependency>
+                            <groupId>org.apache.tomcat</groupId>
+                            <artifactId>tomcat-jsp-api</artifactId>
+                            <version>${tomcat7.version}</version>
+                        </dependency>
+
+                        <dependency>
+                            <groupId>org.apache.tomcat</groupId>
+                            <artifactId>tomcat-jasper</artifactId>
+                            <version>${tomcat7.version}</version>
+                        </dependency>
+
+                        <dependency>
+                            <groupId>org.apache.tomcat</groupId>
+                            <artifactId>tomcat-jasper-el</artifactId>
+                            <version>${tomcat7.version}</version>
+                        </dependency>
+
+                        <dependency>
+                            <groupId>org.apache.tomcat</groupId>
+                            <artifactId>tomcat-el-api</artifactId>
+                            <version>${tomcat7.version}</version>
+                        </dependency>
+
+                        <dependency>
+                            <groupId>org.apache.tomcat</groupId>
+                            <artifactId>tomcat-catalina</artifactId>
+                            <version>${tomcat7.version}</version>
+                        </dependency>
+
+                        <dependency>
+                            <groupId>org.apache.tomcat</groupId>
+                            <artifactId>tomcat-tribes</artifactId>
+                            <version>${tomcat7.version}</version>
+                        </dependency>
+
+                        <dependency>
+                            <groupId>org.apache.tomcat</groupId>
+                            <artifactId>tomcat-catalina-ha</artifactId>
+                            <version>${tomcat7.version}</version>
+                        </dependency>
+
+                        <dependency>
+                            <groupId>org.apache.tomcat</groupId>
+                            <artifactId>tomcat-annotations-api</artifactId>
+                            <version>${tomcat7.version}</version>
+                        </dependency>
+
+                        <!-- tomcat i18n too ?? -->
+
+                        <!-- not sure we need that -->
+                        <dependency>
+                            <groupId>org.apache.tomcat</groupId>
+                            <artifactId>tomcat-juli</artifactId>
+                            <version>${tomcat7.version}</version>
+                        </dependency>
+
+                        <dependency>
+                            <groupId>org.apache.tomcat.embed</groupId>
+                            <artifactId>tomcat-embed-logging-juli</artifactId>
+                            <version>${tomcat7.version}</version>
+                        </dependency>
+                        <dependency>
+                            <groupId>org.apache.tomcat.embed</groupId>
+                            <artifactId>tomcat-embed-logging-log4j</artifactId>
+                            <version>${tomcat7.version}</version>
+                        </dependency>
+
+                    </dependencies>
+                </plugin>
+
+            </plugins>
+        </pluginManagement>
+
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-failsafe-plugin</artifactId>
+                <version>2.11</version>
+                <executions>
+                    <execution>
+                        <id>integration-test</id>
+                        <goals>
+                            <goal>integration-test</goal>
+                        </goals>
+                    </execution>
+                    <execution>
+                        <id>verify</id>
+                        <goals>
+                            <goal>verify</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+
+            <plugin>
+                <groupId>org.apache.tomcat.maven</groupId>
+                <artifactId>tomcat7-maven-plugin</artifactId>
+                <version>2.0-beta-1</version>
+                <configuration>
+                    <path>/${project.build.finalName}</path>
+                    <addContextWarDependencies>true</addContextWarDependencies>
+                    <port>${tomcat.port.it}</port>
+                    <fork>true</fork> <!-- needed for testing ITs -->
+                    <systemProperties>
+                        
<org.apache.myfaces.PROJECT_STAGE>${projectStage}</org.apache.myfaces.PROJECT_STAGE>
+                        
<faces.PROJECT_STAGE>${projectStage}</faces.PROJECT_STAGE>
+                    </systemProperties>
+                </configuration>
+                <executions>
+                    <execution>
+                        <id>start-tomcat</id>
+                        <phase>pre-integration-test</phase>
+                        <goals>
+                            <goal>run</goal>
+                        </goals>
+                    </execution>
+                    <execution>
+                        <id>stop-tomcat</id>
+                        <phase>post-integration-test</phase>
+                        <goals>
+                            <goal>shutdown</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
+
+</project>

Added: 
openwebbeans/trunk/webbeans-tomcat7/src/it/servletinjection/src/main/java/org/apache/webbeans/web/tomcat7/test/TestBean.java
URL: 
http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-tomcat7/src/it/servletinjection/src/main/java/org/apache/webbeans/web/tomcat7/test/TestBean.java?rev=1389623&view=auto
==============================================================================
--- 
openwebbeans/trunk/webbeans-tomcat7/src/it/servletinjection/src/main/java/org/apache/webbeans/web/tomcat7/test/TestBean.java
 (added)
+++ 
openwebbeans/trunk/webbeans-tomcat7/src/it/servletinjection/src/main/java/org/apache/webbeans/web/tomcat7/test/TestBean.java
 Mon Sep 24 22:10:06 2012
@@ -0,0 +1,40 @@
+/*
+ * 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.webbeans.web.tomcat7.test;
+
+import javax.enterprise.context.ApplicationScoped;
+
+/**
+ * Test bean which gets used in the TestServlet.
+ */
+@ApplicationScoped
+public class TestBean
+{
+    int i = 4711;
+
+    public int getI()
+    {
+        return i;
+    }
+
+    public void setI(int i)
+    {
+        this.i = i;
+    }
+}

Propchange: 
openwebbeans/trunk/webbeans-tomcat7/src/it/servletinjection/src/main/java/org/apache/webbeans/web/tomcat7/test/TestBean.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: 
openwebbeans/trunk/webbeans-tomcat7/src/it/servletinjection/src/main/java/org/apache/webbeans/web/tomcat7/test/TestServlet.java
URL: 
http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-tomcat7/src/it/servletinjection/src/main/java/org/apache/webbeans/web/tomcat7/test/TestServlet.java?rev=1389623&view=auto
==============================================================================
--- 
openwebbeans/trunk/webbeans-tomcat7/src/it/servletinjection/src/main/java/org/apache/webbeans/web/tomcat7/test/TestServlet.java
 (added)
+++ 
openwebbeans/trunk/webbeans-tomcat7/src/it/servletinjection/src/main/java/org/apache/webbeans/web/tomcat7/test/TestServlet.java
 Mon Sep 24 22:10:06 2012
@@ -0,0 +1,65 @@
+/*
+ * 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.webbeans.web.tomcat7.test;
+
+import javax.inject.Inject;
+import javax.servlet.Servlet;
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import java.io.IOException;
+
+/**
+ * Dummy Servlet which just checks whether CDI injection works
+ */
+public class TestServlet implements Servlet
+{
+
+    @Inject
+    private TestBean tb;
+
+    public void destroy()
+    {
+        // nothing to do
+    }
+
+    public void init(ServletConfig config) throws ServletException
+    {
+        // nothing to do
+    }
+
+    public ServletConfig getServletConfig()
+    {
+        return null;
+    }
+
+    public void service(ServletRequest req, ServletResponse res) throws 
ServletException, IOException
+    {
+        if (tb == null || tb.getI() != 4711)
+        {
+            throw new RuntimeException("CDI Injction doesn not work!");
+        }
+    }
+
+    public String getServletInfo()
+    {
+        return null;
+    }
+}

Propchange: 
openwebbeans/trunk/webbeans-tomcat7/src/it/servletinjection/src/main/java/org/apache/webbeans/web/tomcat7/test/TestServlet.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: 
openwebbeans/trunk/webbeans-tomcat7/src/it/servletinjection/src/main/webapp/WEB-INF/web.xml
URL: 
http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-tomcat7/src/it/servletinjection/src/main/webapp/WEB-INF/web.xml?rev=1389623&view=auto
==============================================================================
--- 
openwebbeans/trunk/webbeans-tomcat7/src/it/servletinjection/src/main/webapp/WEB-INF/web.xml
 (added)
+++ 
openwebbeans/trunk/webbeans-tomcat7/src/it/servletinjection/src/main/webapp/WEB-INF/web.xml
 Mon Sep 24 22:10:06 2012
@@ -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.
+-->
+<web-app id="owb-it" version="3.0"
+         xmlns="http://java.sun.com/xml/ns/javaee";
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd";>
+    <servlet>
+        <servlet-name>TestServlet</servlet-name>
+        
<servlet-class>org.apache.webbeans.web.tomcat7.test.TestServlet</servlet-class>
+        <load-on-startup>1</load-on-startup>
+    </servlet>
+    <servlet-mapping>
+        <servlet-name>TestServlet</servlet-name>
+        <url-pattern>*.test</url-pattern>
+    </servlet-mapping>
+</web-app>

Propchange: 
openwebbeans/trunk/webbeans-tomcat7/src/it/servletinjection/src/main/webapp/WEB-INF/web.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: openwebbeans/trunk/webbeans-tomcat7/src/it/settings.xml
URL: 
http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-tomcat7/src/it/settings.xml?rev=1389623&view=auto
==============================================================================
--- openwebbeans/trunk/webbeans-tomcat7/src/it/settings.xml (added)
+++ openwebbeans/trunk/webbeans-tomcat7/src/it/settings.xml Mon Sep 24 22:10:06 
2012
@@ -0,0 +1,55 @@
+<?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.
+-->
+
+<settings>
+  <profiles>
+    <profile>
+      <id>it-repo</id>
+      <activation>
+        <activeByDefault>true</activeByDefault>
+      </activation>
+      <repositories>
+        <repository>
+          <id>local.central</id>
+          <url>@localRepositoryUrl@</url>
+          <releases>
+            <enabled>true</enabled>
+          </releases>
+          <snapshots>
+            <enabled>true</enabled>
+          </snapshots>
+        </repository>
+      </repositories>
+      <pluginRepositories>
+        <pluginRepository>
+          <id>local.central</id>
+          <url>@localRepositoryUrl@</url>
+          <releases>
+            <enabled>true</enabled>
+          </releases>
+          <snapshots>
+            <enabled>true</enabled>
+          </snapshots>
+        </pluginRepository>
+      </pluginRepositories>
+    </profile>
+  </profiles>
+</settings>

Propchange: openwebbeans/trunk/webbeans-tomcat7/src/it/settings.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: 
openwebbeans/trunk/webbeans-tomcat7/src/main/java/org/apache/webbeans/web/tomcat/ContextLifecycleListener.java
URL: 
http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-tomcat7/src/main/java/org/apache/webbeans/web/tomcat/ContextLifecycleListener.java?rev=1389623&r1=1389622&r2=1389623&view=diff
==============================================================================
--- 
openwebbeans/trunk/webbeans-tomcat7/src/main/java/org/apache/webbeans/web/tomcat/ContextLifecycleListener.java
 (original)
+++ 
openwebbeans/trunk/webbeans-tomcat7/src/main/java/org/apache/webbeans/web/tomcat/ContextLifecycleListener.java
 Mon Sep 24 22:10:06 2012
@@ -32,6 +32,7 @@ import org.apache.catalina.core.Standard
 import org.apache.catalina.core.StandardServer;
 import org.apache.naming.ContextAccessController;
 import org.apache.tomcat.InstanceManager;
+import org.apache.webbeans.servlet.WebBeansConfigurationListener;
 
 import java.beans.PropertyChangeEvent;
 import java.beans.PropertyChangeListener;
@@ -91,7 +92,7 @@ public class ContextLifecycleListener im
                         String[] oldListeners = 
context.findApplicationListeners();
                         LinkedList<String> listeners = new 
LinkedList<String>();
 
-                        
listeners.addFirst("org.apache.webbeans.servlet.WebBeansConfigurationListener");
+                        
listeners.addFirst(WebBeansConfigurationListener.class.getName());
 
 
                         for(String listener : oldListeners)
@@ -142,7 +143,7 @@ public class ContextLifecycleListener im
                     ClassLoader loader = context.getLoader().getClassLoader();
                     Object listener = event.getData();
                     
-                    
if(listener.getClass().getName().equals("org.apache.webbeans.servlet.WebBeansConfigurationListener"))
+                    
if(listener.getClass().getName().equals(WebBeansConfigurationListener.class.getName()))
                     {
                        
ContextAccessController.setWritable(context.getNamingContextListener().getName(),
 context);                       
                        return;
@@ -161,7 +162,7 @@ public class ContextLifecycleListener im
                     ClassLoader loader = context.getLoader().getClassLoader();
                     Object listener = event.getData();
                     
-                    
if(listener.getClass().getName().equals("org.apache.webbeans.servlet.WebBeansConfigurationListener"))
+                    
if(listener.getClass().getName().equals(WebBeansConfigurationListener.class.getName()))
                     {   
                         InstanceManager processor = 
context.getInstanceManager();
                         InstanceManager custom = new 
TomcatInstanceManager(context.getLoader().getClassLoader(),processor);
@@ -177,7 +178,7 @@ public class ContextLifecycleListener im
                             Object[] listeners = 
context.getApplicationEventListeners();
                             for(Object instance : listeners)
                             {
-                                
if(!instance.getClass().getName().equals("org.apache.webbeans.servlet.WebBeansConfigurationListener"))
+                                
if(!instance.getClass().getName().equals(WebBeansConfigurationListener.class.getName()))
                                 {                                
                                     TomcatUtil.inject(instance, loader);   
                                 }
@@ -188,7 +189,7 @@ public class ContextLifecycleListener im
                 else if(event.getType().equals("beforeContextDestroyed"))
                 {
                     Object listener = event.getData();
-                    
if(listener.getClass().getName().equals("org.apache.webbeans.servlet.WebBeansConfigurationListener"))
+                    
if(listener.getClass().getName().equals(WebBeansConfigurationListener.class.getName()))
                     {
                         
ContextAccessController.setWritable(context.getNamingContextListener().getName(),context);
   
                     }

Added: 
openwebbeans/trunk/webbeans-tomcat7/src/test/java/org/apache/webbeans/web/tomcat/test/OwbTomcatPluginIT.java
URL: 
http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-tomcat7/src/test/java/org/apache/webbeans/web/tomcat/test/OwbTomcatPluginIT.java?rev=1389623&view=auto
==============================================================================
--- 
openwebbeans/trunk/webbeans-tomcat7/src/test/java/org/apache/webbeans/web/tomcat/test/OwbTomcatPluginIT.java
 (added)
+++ 
openwebbeans/trunk/webbeans-tomcat7/src/test/java/org/apache/webbeans/web/tomcat/test/OwbTomcatPluginIT.java
 Mon Sep 24 22:10:06 2012
@@ -0,0 +1,27 @@
+/*
+ * 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.webbeans.web.tomcat.test;
+
+/**
+ *
+ */
+public class OwbTomcatPluginIT
+{
+
+}


Reply via email to