Author: jboynes
Date: Sun Jul 28 23:45:37 2013
New Revision: 1507873

URL: http://svn.apache.org/r1507873
Log:
Ensure the JasperInitializer is used when running tests.
This led to discovery of 55319 but otherwise has no impact at this time.
However, when we handle TLD processing from the SCI then this will be needed.

Added:
    tomcat/trunk/test/META-INF/
    tomcat/trunk/test/META-INF/services/
    
tomcat/trunk/test/META-INF/services/javax.servlet.ServletContainerInitializer
    tomcat/trunk/test/org/apache/jasper/servlet/TestJasperInitializer.java   
(with props)
Modified:
    tomcat/trunk/build.xml

Modified: tomcat/trunk/build.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/build.xml?rev=1507873&r1=1507872&r2=1507873&view=diff
==============================================================================
--- tomcat/trunk/build.xml (original)
+++ tomcat/trunk/build.xml Sun Jul 28 23:45:37 2013
@@ -1225,6 +1225,9 @@
       <include name="org/apache/**" />
       <include name="javax/**" />
     </javac>
+    <copy todir="${test.classes}">
+        <fileset dir="test" includes="META-INF/**"/>
+    </copy>
   </target>
 
   <!-- Default JUnit log output formatter -->

Added: 
tomcat/trunk/test/META-INF/services/javax.servlet.ServletContainerInitializer
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/META-INF/services/javax.servlet.ServletContainerInitializer?rev=1507873&view=auto
==============================================================================
--- 
tomcat/trunk/test/META-INF/services/javax.servlet.ServletContainerInitializer 
(added)
+++ 
tomcat/trunk/test/META-INF/services/javax.servlet.ServletContainerInitializer 
Sun Jul 28 23:45:37 2013
@@ -0,0 +1,2 @@
+# SCIs that should be added when running tests
+org.apache.jasper.servlet.JasperInitializer

Added: tomcat/trunk/test/org/apache/jasper/servlet/TestJasperInitializer.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/jasper/servlet/TestJasperInitializer.java?rev=1507873&view=auto
==============================================================================
--- tomcat/trunk/test/org/apache/jasper/servlet/TestJasperInitializer.java 
(added)
+++ tomcat/trunk/test/org/apache/jasper/servlet/TestJasperInitializer.java Sun 
Jul 28 23:45:37 2013
@@ -0,0 +1,38 @@
+/*
+ * 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.jasper.servlet;
+
+import java.util.ServiceLoader;
+
+import javax.servlet.ServletContainerInitializer;
+
+import org.junit.Test;
+
+/**
+ *
+ */
+public class TestJasperInitializer {
+
+    @Test
+    public void testServiceLoader() {
+        ServiceLoader<ServletContainerInitializer> initializers =
+                ServiceLoader.load(ServletContainerInitializer.class);
+        for (ServletContainerInitializer initializer : initializers) {
+            System.out.println(initializer.getClass().getName());
+        }
+    }
+}

Propchange: 
tomcat/trunk/test/org/apache/jasper/servlet/TestJasperInitializer.java
------------------------------------------------------------------------------
    svn:eol-style = native



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to