svn commit: r775613 - in /jakarta/taglibs/proper/string/trunk/string-test: ./ src/ src/main/ src/main/webapp/ src/main/webapp/WEB-INF/ src/main/webapp/org/ src/main/webapp/org/apache/ src/main/webapp/org/apache/taglibs/ src/main/webapp/org/apache/tagli...

[email protected]
Newsgroups gmane.comp.jakarta.taglibs.devel
Message-ID <[email protected]>
Author: bayard
Date: Sun May 17 09:42:58 2009
New Revision: 775613

URL: http://svn.apache.org/viewvc?rev=775613&view=rev
Log:
Adding Cactus test for String. Build appears to work - but result is not being seen in the pageContext. Unsure why. 

Added:
    jakarta/taglibs/proper/string/trunk/string-test/
    jakarta/taglibs/proper/string/trunk/string-test/pom.xml   (with props)
    jakarta/taglibs/proper/string/trunk/string-test/src/
    jakarta/taglibs/proper/string/trunk/string-test/src/main/
    jakarta/taglibs/proper/string/trunk/string-test/src/main/webapp/
    jakarta/taglibs/proper/string/trunk/string-test/src/main/webapp/WEB-INF/
    jakarta/taglibs/proper/string/trunk/string-test/src/main/webapp/WEB-INF/web.xml   (with props)
    jakarta/taglibs/proper/string/trunk/string-test/src/main/webapp/org/
    jakarta/taglibs/proper/string/trunk/string-test/src/main/webapp/org/apache/
    jakarta/taglibs/proper/string/trunk/string-test/src/main/webapp/org/apache/taglibs/
    jakarta/taglibs/proper/string/trunk/string-test/src/main/webapp/org/apache/taglibs/string/
    jakarta/taglibs/proper/string/trunk/string-test/src/main/webapp/org/apache/taglibs/string/CapitalizeTest.jsp   (with props)
    jakarta/taglibs/proper/string/trunk/string-test/src/test/
    jakarta/taglibs/proper/string/trunk/string-test/src/test/java/
    jakarta/taglibs/proper/string/trunk/string-test/src/test/java/org/
    jakarta/taglibs/proper/string/trunk/string-test/src/test/java/org/apache/
    jakarta/taglibs/proper/string/trunk/string-test/src/test/java/org/apache/taglibs/
    jakarta/taglibs/proper/string/trunk/string-test/src/test/java/org/apache/taglibs/string/
    jakarta/taglibs/proper/string/trunk/string-test/src/test/java/org/apache/taglibs/string/CapitalizeTest.java   (with props)

Added: jakarta/taglibs/proper/string/trunk/string-test/pom.xml
URL: http://svn.apache.org/viewvc/jakarta/taglibs/proper/string/trunk/string-test/pom.xml?rev=775613&view=auto
==============================================================================
--- jakarta/taglibs/proper/string/trunk/string-test/pom.xml (added)
+++ jakarta/taglibs/proper/string/trunk/string-test/pom.xml Sun May 17 09:42:58 2009
@@ -0,0 +1,194 @@
+<?xml version="1.0"?>
+<!--
+   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.
+-->
+<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">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.apache.taglibs</groupId>
+    <artifactId>taglibs-parent</artifactId>
+    <version>1-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>taglibs-string-test</artifactId>
+  <version>1.1.1-SNAPSHOT</version>
+  <name>Jakarta String Taglib Cactus Tests</name>
+  <packaging>war</packaging>
+
+  <inceptionYear>2009</inceptionYear>
+  <description>
+    The Cactus tests for the Jakarta String Taglib
+  </description>
+
+  <url>http://jakarta.apache.org/taglibs/string/</url>
+
+  <scm>
+    <connection>scm:svn:http://svn.apache.org/repos/asf/jakarta/taglibs/proper/string/trunk/string-test</connection>
+    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/jakarta/taglibs/proper/string/trunk/string-test</developerConnection>
+    <url>http://svn.apache.org/viewvc/jakarta/taglibs/proper/string/trunk/string-test</url>
+  </scm>
+
+  <distributionManagement>
+    <site>
+      <id>apache.website</id>
+      <name>Apache Website</name>
+      <url>scpexe://people.apache.org/www/jakarta.apache.org/taglibs/string/string-test/</url>
+    </site>
+  </distributionManagement>
+
+  <developers>
+    <developer><name>Henri Yandell</name></developer>
+    <developer><name>Bjorn Townsend</name></developer>
+  </developers>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.taglibs</groupId>
+      <artifactId>taglibs-string</artifactId>
+      <version>1.1.1-SNAPSHOT</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.cactus</groupId>
+      <artifactId>cactus.core.framework.javaEE.13-14</artifactId>
+      <version>1.8.1</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.cactus</groupId>
+      <artifactId>cactus.core.framework.wrapper.javaEE.14</artifactId>
+      <version>1.8.1</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.cactus</groupId>
+      <artifactId>cactus.integration.shared.api</artifactId>
+      <version>1.8.1</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>3.8.2</version>
+      <scope>test</scope>
+    </dependency>
+  </dependencies> 
+
+  <build>
+    <plugins>
+
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-war-plugin</artifactId>
+        <configuration>
+          <webResources>
+            <resource>
+              <targetPath>WEB-INF/classes</targetPath>
+              <directory>target/test-classes</directory>
+            </resource>
+          </webResources>
+        </configuration>
+      </plugin>
+
+      <plugin>
+        <groupId>org.apache.cactus</groupId>
+        <artifactId>cactus.integration.maven2</artifactId>
+        <version>1.8.1</version>
+        <configuration>
+          <srcFile>target/taglibs-string-test-1.1.1-SNAPSHOT.war</srcFile>
+          <destFile>target/cactus-taglibs-string-test-1.1.1-SNAPSHOT.war</destFile>
+        </configuration>
+        <executions>
+          <execution>
+            <id>cactus-cactifywar</id>
+            <phase>package</phase>
+            <goals>
+              <goal>cactifywar</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <configuration>
+          <skip>true</skip>
+        </configuration>
+        <executions>
+          <execution>
+            <id>surefire-it</id>
+            <phase>integration-test</phase>
+            <goals>
+              <goal>test</goal>
+            </goals>
+            <configuration>
+              <skip>false</skip>
+              <systemProperties>
+                <property>
+                  <name>cactus.contextURL</name>
+                  <value>http://localhost:8080/taglibs-string-test</value>
+                </property>
+              </systemProperties>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+
+      <plugin>
+        <groupId>org.mortbay.jetty</groupId>
+        <artifactId>maven-jetty-plugin</artifactId>
+        <version>6.1.10</version>   <!-- appears to be required to enable daemon=true behaviour -->
+        <configuration>
+          <scanIntervalSeconds>10</scanIntervalSeconds>
+          <connectors>
+            <connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
+              <port>8080</port>
+              <maxIdleTime>60000</maxIdleTime>
+            </connector>
+          </connectors>
+        </configuration>
+        <executions>
+          <execution>
+            <id>start-jetty</id>
+            <phase>pre-integration-test</phase>
+            <goals>
+              <goal>run-war</goal>
+            </goals>
+            <configuration>
+              <scanIntervalSeconds>0</scanIntervalSeconds>
+              <daemon>true</daemon>
+              <webApp>target/cactus-taglibs-string-test-1.1.1-SNAPSHOT.war</webApp>
+            </configuration>
+          </execution>
+          <execution>
+            <id>stop-jetty</id>
+            <phase>post-integration-test</phase>
+            <goals>
+              <goal>stop</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+
+    </plugins>
+  </build>
+
+
+</project>

Propchange: jakarta/taglibs/proper/string/trunk/string-test/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: jakarta/taglibs/proper/string/trunk/string-test/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/jakarta/taglibs/proper/string/trunk/string-test/src/main/webapp/WEB-INF/web.xml?rev=775613&view=auto
==============================================================================
--- jakarta/taglibs/proper/string/trunk/string-test/src/main/webapp/WEB-INF/web.xml (added)
+++ jakarta/taglibs/proper/string/trunk/string-test/src/main/webapp/WEB-INF/web.xml Sun May 17 09:42:58 2009
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<web-app 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_2_5.xsd"
+         version="2.5">
+
+    <display-name>String Taglib test</display-name>
+    <description>String Taglib test</description>
+    
+</web-app>

Propchange: jakarta/taglibs/proper/string/trunk/string-test/src/main/webapp/WEB-INF/web.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: jakarta/taglibs/proper/string/trunk/string-test/src/main/webapp/org/apache/taglibs/string/CapitalizeTest.jsp
URL: http://svn.apache.org/viewvc/jakarta/taglibs/proper/string/trunk/string-test/src/main/webapp/org/apache/taglibs/string/CapitalizeTest.jsp?rev=775613&view=auto
==============================================================================
--- jakarta/taglibs/proper/string/trunk/string-test/src/main/webapp/org/apache/taglibs/string/CapitalizeTest.jsp (added)
+++ jakarta/taglibs/proper/string/trunk/string-test/src/main/webapp/org/apache/taglibs/string/CapitalizeTest.jsp Sun May 17 09:42:58 2009
@@ -0,0 +1,3 @@
+<%@ taglib uri="http://jakarta.apache.org/taglibs/string-1.1" prefix="str" %>
+
+<str:capitalize var="test">test successful</str:capitalize>

Propchange: jakarta/taglibs/proper/string/trunk/string-test/src/main/webapp/org/apache/taglibs/string/CapitalizeTest.jsp
------------------------------------------------------------------------------
    svn:eol-style = native

Added: jakarta/taglibs/proper/string/trunk/string-test/src/test/java/org/apache/taglibs/string/CapitalizeTest.java
URL: http://svn.apache.org/viewvc/jakarta/taglibs/proper/string/trunk/string-test/src/test/java/org/apache/taglibs/string/CapitalizeTest.java?rev=775613&view=auto
==============================================================================
--- jakarta/taglibs/proper/string/trunk/string-test/src/test/java/org/apache/taglibs/string/CapitalizeTest.java (added)
+++ jakarta/taglibs/proper/string/trunk/string-test/src/test/java/org/apache/taglibs/string/CapitalizeTest.java Sun May 17 09:42:58 2009
@@ -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.taglibs.string;
+
+import javax.servlet.jsp.*;
+import org.apache.cactus.*;
+
+public class CapitalizeTest extends JspTestCase {
+
+    public void testCapitalize() throws Exception {
+        String toInclude = getTestJsp(this);
+        pageContext.include(toInclude);
+
+        String test = (String) pageContext.getAttribute("test");
+
+        assertEquals("JSP set incorrect value", "Test successful", test);
+    }
+
+     private static String getTestJsp(Object obj) {
+         String className = obj.getClass().getName();
+         String baseName = className.replace('.', '/');
+         return "/" + baseName + ".jsp";
+     }
+
+}

Propchange: jakarta/taglibs/proper/string/trunk/string-test/src/test/java/org/apache/taglibs/string/CapitalizeTest.java
------------------------------------------------------------------------------
    svn:eol-style = native
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.