You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by mf...@apache.org on 2010/03/30 22:57:22 UTC

svn commit: r929275 - in /myfaces/portlet-bridge/testsuite/trunk: ./ portlet-bridge-testsuite-section3-2-lifecycle-set/ portlet-bridge-testsuite-section3-2-lifecycle-set/src/ portlet-bridge-testsuite-section3-2-lifecycle-set/src/main/ portlet-bridge-te...

Author: mfreedman
Date: Tue Mar 30 20:57:21 2010
New Revision: 929275

URL: http://svn.apache.org/viewvc?rev=929275&view=rev
Log:
PORTLETBRIDGE-137: Adds Configured Lifecycle test.

Added:
    myfaces/portlet-bridge/testsuite/trunk/portlet-bridge-testsuite-section3-2-lifecycle-set/
    myfaces/portlet-bridge/testsuite/trunk/portlet-bridge-testsuite-section3-2-lifecycle-set/pom.xml
    myfaces/portlet-bridge/testsuite/trunk/portlet-bridge-testsuite-section3-2-lifecycle-set/src/
    myfaces/portlet-bridge/testsuite/trunk/portlet-bridge-testsuite-section3-2-lifecycle-set/src/main/
    myfaces/portlet-bridge/testsuite/trunk/portlet-bridge-testsuite-section3-2-lifecycle-set/src/main/webapp/
    myfaces/portlet-bridge/testsuite/trunk/portlet-bridge-testsuite-section3-2-lifecycle-set/src/main/webapp/WEB-INF/
    myfaces/portlet-bridge/testsuite/trunk/portlet-bridge-testsuite-section3-2-lifecycle-set/src/main/webapp/WEB-INF/faces-config.xml
    myfaces/portlet-bridge/testsuite/trunk/portlet-bridge-testsuite-section3-2-lifecycle-set/src/main/webapp/WEB-INF/portlet.xml
    myfaces/portlet-bridge/testsuite/trunk/portlet-bridge-testsuite-section3-2-lifecycle-set/src/main/webapp/WEB-INF/web.xml
    myfaces/portlet-bridge/testsuite/trunk/portlet-bridge-testsuite-section3-2-lifecycle-set/src/main/webapp/tests/
    myfaces/portlet-bridge/testsuite/trunk/portlet-bridge-testsuite-section3-2-lifecycle-set/src/main/webapp/tests/SingleRequestTest.jsp
Modified:
    myfaces/portlet-bridge/testsuite/trunk/pom.xml

Modified: myfaces/portlet-bridge/testsuite/trunk/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/testsuite/trunk/pom.xml?rev=929275&r1=929274&r2=929275&view=diff
==============================================================================
--- myfaces/portlet-bridge/testsuite/trunk/pom.xml (original)
+++ myfaces/portlet-bridge/testsuite/trunk/pom.xml Tue Mar 30 20:57:21 2010
@@ -25,6 +25,7 @@
 
   <modules>
     <module>portlet-bridge-testsuite-main</module>
+    <module>portlet-bridge-testsuite-section3-2-lifecycle-set</module>
     <module>portlet-bridge-testsuite-section3-2-render-policy-always-delegate</module>
     <module>portlet-bridge-testsuite-section3-2-render-policy-never-delegate</module>
     <module>portlet-bridge-testsuite-section3-2-render-policy-default</module>

Added: myfaces/portlet-bridge/testsuite/trunk/portlet-bridge-testsuite-section3-2-lifecycle-set/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/testsuite/trunk/portlet-bridge-testsuite-section3-2-lifecycle-set/pom.xml?rev=929275&view=auto
==============================================================================
--- myfaces/portlet-bridge/testsuite/trunk/portlet-bridge-testsuite-section3-2-lifecycle-set/pom.xml (added)
+++ myfaces/portlet-bridge/testsuite/trunk/portlet-bridge-testsuite-section3-2-lifecycle-set/pom.xml Tue Mar 30 20:57:21 2010
@@ -0,0 +1,161 @@
+<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>
+  
+  <groupId>org.apache.myfaces.portlet-bridge</groupId>
+  <artifactId>portlet-bridge-testsuite-section3-2-lifecycle-set</artifactId>
+  <packaging>war</packaging>
+  <name>MyFaces Portlet Bridge Test Suite - Section 3.2 LIFECYCLE_ID set to TCKLifecycle</name>
+  <version>1.0.0-SNAPSHOT</version>	 
+  <description>
+  This project builds and tests a testsuite web application with a single 
+  lifecycle test portlet and the portlet context parameter
+  javax.portlet.faces.LIFECYCLE_ID set to TCKLifecycle.
+  </description>
+  
+  <parent>
+    <artifactId>portlet-bridge-testsuite-master</artifactId>
+    <groupId>org.apache.myfaces.portlet-bridge</groupId>
+    <version>1.0.0-SNAPSHOT</version>
+  </parent>
+  <build>
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <groupId>org.codehaus.mojo</groupId>
+          <artifactId>selenium-maven-plugin</artifactId>
+          <executions>
+            <execution>
+              <id>start</id>
+              <phase>process-test-classes</phase>
+              <goals>
+                <goal>start-server</goal>
+              </goals>
+              <configuration>
+                <background>true</background>
+                <logOutput>true</logOutput>
+                <multiWindow>true</multiWindow>
+              </configuration>
+            </execution>
+          </executions>
+        </plugin>
+
+        <plugin>
+          <groupId>org.mortbay.jetty</groupId>
+          <artifactId>maven-jetty-plugin</artifactId>
+          <executions>
+            <execution>
+              <id>start-jetty</id>
+              <phase>process-test-classes</phase>
+              <goals>
+                <goal>run</goal>
+              </goals>
+              <configuration>
+                <scanIntervalSeconds>0</scanIntervalSeconds>
+                <daemon>true</daemon>
+              </configuration>
+            </execution>
+            <execution>
+              <id>stop-jetty</id>
+              <phase>test</phase>
+              <goals>
+                <goal>stop</goal>
+              </goals>
+            </execution>
+          </executions>
+        </plugin>
+
+        <plugin>
+          <groupId>org.apache.pluto</groupId>
+          <artifactId>maven-pluto-plugin</artifactId>
+          <version>${pluto.version}</version>
+          <executions>
+            <execution>
+              <phase>generate-resources</phase>
+              <goals>
+                <goal>assemble</goal>
+              </goals>
+            </execution>
+          </executions>
+        </plugin>
+
+        <plugin>
+          <groupId>org.apache.portals.pluto</groupId>
+          <artifactId>maven-pluto-plugin</artifactId>
+          <version>2.0.0</version>
+          <executions>
+            <execution>
+              <phase>generate-resources</phase>
+              <goals>
+                <goal>assemble</goal>
+              </goals>
+            </execution>
+          </executions>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+
+    <plugins>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>build-helper-maven-plugin</artifactId>
+        <version>1.3</version>
+        <executions>
+          <execution>
+            <id>add-ts-source</id>
+            <phase>generate-sources</phase>
+            <goals>
+              <goal>add-source</goal>
+            </goals>
+            <configuration>
+              <sources>
+                <source>${basedir}/../src/main/java</source>
+              </sources>
+            </configuration>
+          </execution>
+          <execution>
+            <id>add-tck-source</id>
+            <phase>generate-sources</phase>
+            <goals>
+              <goal>add-test-source</goal>
+            </goals>
+            <configuration>
+              <sources>
+                <source>${basedir}/../src/test/java</source>
+              </sources>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>xml-maven-plugin</artifactId>
+        <configuration>
+          <transformationSets>
+            <transformationSet>
+              <dir>${basedir}/src/main/webapp/WEB-INF</dir>
+              <includes>
+                <include>portlet.xml</include>
+              </includes>
+              <outputDir>${bridge.tck.test.file.dir}</outputDir>
+              <fileMappers>
+                <fileMapper implementation="org.codehaus.plexus.components.io.filemappers.MergeFileMapper">
+                  <targetName>${bridge.tck.test.file.name}</targetName>
+                </fileMapper>
+              </fileMappers>
+              <parameters>
+                <parameter>
+                  <name>page-path</name>
+                  <value>${bridge.tck.test.path}</value>
+                </parameter>
+              </parameters>                
+              <stylesheet>${bridge.tck.test.file.stylesheet}</stylesheet>
+            </transformationSet>
+          </transformationSets>
+        </configuration>
+      </plugin>
+
+    </plugins>
+  </build>
+
+</project>

Added: myfaces/portlet-bridge/testsuite/trunk/portlet-bridge-testsuite-section3-2-lifecycle-set/src/main/webapp/WEB-INF/faces-config.xml
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/testsuite/trunk/portlet-bridge-testsuite-section3-2-lifecycle-set/src/main/webapp/WEB-INF/faces-config.xml?rev=929275&view=auto
==============================================================================
--- myfaces/portlet-bridge/testsuite/trunk/portlet-bridge-testsuite-section3-2-lifecycle-set/src/main/webapp/WEB-INF/faces-config.xml (added)
+++ myfaces/portlet-bridge/testsuite/trunk/portlet-bridge-testsuite-section3-2-lifecycle-set/src/main/webapp/WEB-INF/faces-config.xml Tue Mar 30 20:57:21 2010
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee"
+              xmlns:bridge="http://www.apache.org/myfaces/xml/ns/bridge/bridge-extension"
+              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-facesconfig_1_2.xsd">
+
+  <factory>
+    <application-factory>org.apache.myfaces.portlet.faces.testsuite.common.util.faces.application.TestSuiteApplicationFactoryImpl</application-factory>
+    <faces-context-factory>org.apache.myfaces.portlet.faces.testsuite.common.util.faces.context.TCK_FacesContextFactoryImpl</faces-context-factory>
+    <lifecycle-factory>org.apache.myfaces.portlet.faces.testsuite.common.util.faces.application.TestSuiteLifecycleFactoryImpl</lifecycle-factory>
+  </factory>
+  
+  <managed-bean>
+    <managed-bean-name>chapter3Tests</managed-bean-name>
+    <managed-bean-class>org.apache.myfaces.portlet.faces.testsuite.tests.chapter_3.Tests</managed-bean-class>
+    <managed-bean-scope>request</managed-bean-scope>
+  </managed-bean> 
+  <managed-bean>
+    <managed-bean-name>test</managed-bean-name>
+    <managed-bean-class>org.apache.myfaces.portlet.faces.testsuite.beans.TestRunnerBean</managed-bean-class>
+    <managed-bean-scope>request</managed-bean-scope>
+  </managed-bean>  
+    
+</faces-config>

Added: myfaces/portlet-bridge/testsuite/trunk/portlet-bridge-testsuite-section3-2-lifecycle-set/src/main/webapp/WEB-INF/portlet.xml
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/testsuite/trunk/portlet-bridge-testsuite-section3-2-lifecycle-set/src/main/webapp/WEB-INF/portlet.xml?rev=929275&view=auto
==============================================================================
--- myfaces/portlet-bridge/testsuite/trunk/portlet-bridge-testsuite-section3-2-lifecycle-set/src/main/webapp/WEB-INF/portlet.xml (added)
+++ myfaces/portlet-bridge/testsuite/trunk/portlet-bridge-testsuite-section3-2-lifecycle-set/src/main/webapp/WEB-INF/portlet.xml Tue Mar 30 20:57:21 2010
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<portlet-app version="1.0"
+             xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
+             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+             xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd">
+
+    <portlet>
+        <portlet-name>chapter3Tests-lifecycleTest-portlet</portlet-name>
+        <portlet-class>org.apache.myfaces.portlet.faces.testsuite.common.portlet.GenericFacesTestSuitePortlet</portlet-class>
+
+        <init-param>
+          <name>javax.portlet.faces.defaultViewId.view</name>
+          <value>/tests/SingleRequestTest.jsp</value>
+        </init-param>
+
+        <expiration-cache>0</expiration-cache>
+
+       <supports>
+         <mime-type>text/html</mime-type>
+       </supports>
+        <portlet-info>
+                <title>chapter3Tests-lifecycleTest-portlet - LIFECYCLE IMPLEMENTATION CLASS SET</title>
+        </portlet-info>
+    </portlet>
+
+</portlet-app>

Added: myfaces/portlet-bridge/testsuite/trunk/portlet-bridge-testsuite-section3-2-lifecycle-set/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/testsuite/trunk/portlet-bridge-testsuite-section3-2-lifecycle-set/src/main/webapp/WEB-INF/web.xml?rev=929275&view=auto
==============================================================================
--- myfaces/portlet-bridge/testsuite/trunk/portlet-bridge-testsuite-section3-2-lifecycle-set/src/main/webapp/WEB-INF/web.xml (added)
+++ myfaces/portlet-bridge/testsuite/trunk/portlet-bridge-testsuite-section3-2-lifecycle-set/src/main/webapp/WEB-INF/web.xml Tue Mar 30 20:57:21 2010
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!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>
+  <display-name>bridge_Test_web_section3-2-lifecycle-set</display-name>
+  <context-param>
+    <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
+    <param-value>.jsp</param-value>
+  </context-param>
+  <context-param>
+    <param-name>javax.portlet.faces.LIFECYCLE_ID</param-name>
+    <param-value>TCKLifecycle</param-value>
+  </context-param>
+
+
+  <!-- Faces Servlet -->
+  <servlet>
+    <servlet-name>faces</servlet-name>
+    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+  </servlet>
+
+
+  <!-- Faces Servlet Mappings -->
+  <!--
+    In this demo application, I chose to use suffix mapping.  I did this because it makes urls
+    in the portlet world look nicer in the source.  The portlet url should be the same
+    reguardless.
+  -->
+  <servlet-mapping>
+    <servlet-name>faces</servlet-name>
+    <url-pattern>*.jsf</url-pattern>
+  </servlet-mapping>
+</web-app>

Added: myfaces/portlet-bridge/testsuite/trunk/portlet-bridge-testsuite-section3-2-lifecycle-set/src/main/webapp/tests/SingleRequestTest.jsp
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/testsuite/trunk/portlet-bridge-testsuite-section3-2-lifecycle-set/src/main/webapp/tests/SingleRequestTest.jsp?rev=929275&view=auto
==============================================================================
--- myfaces/portlet-bridge/testsuite/trunk/portlet-bridge-testsuite-section3-2-lifecycle-set/src/main/webapp/tests/SingleRequestTest.jsp (added)
+++ myfaces/portlet-bridge/testsuite/trunk/portlet-bridge-testsuite-section3-2-lifecycle-set/src/main/webapp/tests/SingleRequestTest.jsp Tue Mar 30 20:57:21 2010
@@ -0,0 +1,22 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+"http://www.w3.org/TR/html4/loose.dtd">
+<%@ page contentType="text/html;charset=UTF-8"%>
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+
+     
+<f:view>
+  <html>
+    <head>
+      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+      <title>JSR 301 Single Request TCK Test</title>
+    </head>
+    <body>
+      <h:form>
+        <h:panelGrid columns="1">
+          <h:outputText escape = "false" value="#{test.renderTestResult}"/>
+        </h:panelGrid>
+      </h:form>
+    </body>
+  </html>
+</f:view>