Initial Import of Pluto 1.1 seed code.

git-svn-id: https://svn.apache.org/repos/asf/portals/pluto/branches/testsuite@54049 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/maven.xml b/maven.xml
new file mode 100644
index 0000000..28ef705
--- /dev/null
+++ b/maven.xml
@@ -0,0 +1,99 @@
+<!-- 

+Copyright 2004 The Apache Software Foundation.

+Licensed  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 default="deployTestsuite"

+    xmlns:j="jelly:core"

+    xmlns:maven="jelly:maven"

+    xmlns:ant="jelly:ant">

+

+<!--

+    <preGoal name="war">

+        <maven:reactor

+          basedir="${pluto.testsuite.dir}"

+          includes="project.xml"

+          goals="war:war"

+          postProcessing="false"

+          ignoreFailures="false"/>

+    </preGoal>

+-->

+

+    <!-- The multiproject won't let us call war directly, we must specify

+         since it won't be set by war goal. -->

+    <preGoal name="deployTestsuite">

+        <j:set var="maven.war.final.name" value="testsuite.war"/>

+    </preGoal>

+

+    <goal name="deployTestsuite">

+        <java classname="org.apache.pluto.portalImpl.Deploy" fork="yes">

+            <classpath>

+                <path refid="maven.dependency.classpath"/>

+                <pathelement path="${maven.build.dest}"/>

+            </classpath>

+            <arg value="${maven.tomcat.home}/webapps"/>

+            <arg value="pluto"/>

+            <arg value="${basedir}/target/${maven.war.final.name}"/>

+            <arg value=".."/>

+        </java>

+    </goal>

+    <preGoal name="tomcat:deploy">

+        <j:set var="maven.war.final.name" value="testsuite.war"/>

+    </preGoal>

+

+    <goal name="tomcat:init">

+        <j:set var="vers" value="${maven.tomcat.version.major}"/>

+        <j:if test="${vers==null}">

+            <ant:available property="maven.tomcat.version.major"

+                value="5"

+                type="file"

+                file="${maven.tomcat.home}/conf/Catalina/admin.xml"/>

+        </j:if>

+

+        <j:set var="vers" value="${maven.tomcat.version.major}"/>

+        <j:if test="${vers==null}">

+            <ant:available property="maven.tomcat.version.major"

+                value="5"

+                type="file"

+                file="${maven.tomcat.home}/webapps/admin.xml"/>

+        </j:if>

+

+        <j:set var="depl" value="${maven.tomcat.deploy}"/>

+        <j:if test="${depl != 'exploded'}">

+            <j:set var="maven.tomcat.deploy" value="war"/>

+        </j:if>

+

+        <echo>Deploying to Tomcat:

+		  Location:       ${maven.tomcat.home}

+		  Major Version:  ${maven.tomcat.version.major}

+		  Hosts:          ${maven.tomcat.host}

+		  Context Config: ${maven.tomcat.context.config}

+		  Deploy Type:    ${maven.tomcat.deploy}

+

+        </echo>

+    </goal>

+

+    <goal name="tomcat:deploy">

+        <j:set var="depType" value="${maven.tomcat.deploy}"/>

+        <j:if test="${depType=='exploded'}">

+            <unwar src="target/${maven.war.final.name}" dest="${maven.tomcat.home}/webapps/testsuite"/>

+        </j:if>

+        <j:if test="${depType=='war'}">

+            <copy file="target/${maven.war.final.name}"

+                todir="${maven.tomcat.home}/webapps"/>

+        </j:if>

+    </goal>

+

+

+</project>

diff --git a/project.properties b/project.properties
new file mode 100644
index 0000000..2a2152f
--- /dev/null
+++ b/project.properties
@@ -0,0 +1,40 @@
+# 

+# Copyright 2004 The Apache Software Foundation.

+# Licensed  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.

+#

+#

+# Display the date on the Maven web site

+maven.xdoc.date = left

+

+# Display the maven version the web site is documenting

+maven.xdoc.version = ${pom.currentVersion}

+

+maven.compile.deprecation=on

+

+maven.junit.fork = true

+

+maven.checkstyle.header.file = ${basedir}/../LICENSE.TXT

+maven.license.licenseFile=${basedir}/../LICENSE.TXT

+

+maven.multiproject.type = war

+

+maven.checkstyle.format = turbine

+maven.tomcat.host=localhost

+maven.tomcat.context.config=pluto.xml

+maven.tomcat.deploy=exploded

+

+maven.war.src=${pluto.testsuite.dir}/src/webapp

+maven.war.src.includes=**/*

+maven.war.webxml=${basedir}/src/webapp/WEB-INF/web.xml

diff --git a/project.xml b/project.xml
new file mode 100644
index 0000000..64d25e5
--- /dev/null
+++ b/project.xml
@@ -0,0 +1,180 @@
+<?xml version="1.0" encoding="UTF-8"?>

+<!-- 

+Copyright 2004 The Apache Software Foundation.

+Licensed  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>

+    <extend>${basedir}/../project.xml</extend>

+    <name>Pluto Portlet Test Suite</name>

+    <id>testsuite</id>

+    <groupId>pluto</groupId>

+

+    <organization>

+        <logo>/../../images/apache-portals.gif</logo>

+    </organization>

+    <logo>/../../images/pluto.png</logo>

+

+    <shortDescription>Assorted portlets for testing</shortDescription>

+

+    <description>

+    Assorted portlets for testing

+    </description>

+

+    <dependencies>

+        <dependency>

+            <id>castor</id>

+            <version>0.9.5</version>

+            <properties>

+                <war.bundle>true</war.bundle>

+            </properties>

+        </dependency>

+

+        <dependency>

+            <id>pluto</id>

+            <version>1.0.1</version>

+            <properties>

+                <war.bundle>false</war.bundle>

+            </properties>

+        </dependency>

+

+        <dependency>

+            <id>pluto-portal</id>

+            <groupId>pluto</groupId>

+            <version>1.0.1</version>

+            <properties>

+                <war.bundle>false</war.bundle>

+            </properties>

+        </dependency>

+

+        <dependency>

+            <id>portlet-api</id>

+            <groupId>portlet-api</groupId>

+            <version>1.0</version>

+            <properties>

+                <war.bundle>false</war.bundle>

+            </properties>

+        </dependency>

+        <dependency>

+            <id>servletapi</id>

+            <version>2.3</version>

+            <properties>

+                <war.bundle>false</war.bundle>

+            </properties>

+        </dependency>

+

+        <dependency>

+            <id>xerces</id>

+            <version>2.3.0</version>

+            <properties>

+                <war.bundle>false</war.bundle>

+            </properties>

+        </dependency>

+

+        <dependency>

+            <id>xml-apis</id>

+            <version>2.0.2</version>

+            <properties>

+                <war.bundle>false</war.bundle>

+            </properties>

+        </dependency>

+

+        <dependency>

+            <id>jstl</id>

+            <version>1.0.2</version>

+            <properties>

+                <war.bundle>true</war.bundle>

+            </properties>

+        </dependency>

+

+        <dependency>

+            <id>commons-digester</id>

+            <version>1.5</version>

+            <properties>

+                <war.bundle>true</war.bundle>

+            </properties>

+        </dependency>

+

+        <dependency>

+            <id>commons-beanutils</id>

+            <version>1.6.1</version>

+            <url>http://jakarta.apache.org/commons/beanutils</url>

+            <properties>

+                <war.bundle>true</war.bundle>

+            </properties>

+        </dependency>

+

+        <dependency>

+            <groupId>taglibs</groupId>

+            <artifactId>standard</artifactId>

+            <version>1.0.4</version>

+            <properties>

+                <war.bundle>true</war.bundle>

+            </properties>

+        </dependency>

+

+    </dependencies>

+

+    <build>

+

+        <nagEmailAddress>pluto-dev@jakarta.apache.org</nagEmailAddress>

+

+        <sourceDirectory>${pluto.testsuite.dir}/src/java</sourceDirectory>

+        <aspectSourceDirectory/>

+

+        <unitTestSourceDirectory>src/test</unitTestSourceDirectory>

+

+        <unitTest>

+            <includes>

+                <include>**/*Test.java</include>

+            </includes>

+        </unitTest>

+

+        <integrationUnitTestSourceDirectory>src/rttest</integrationUnitTestSourceDirectory>

+

+        <integrationUnitTest>

+            <includes>

+                <include>**/*Test.java</include>

+            </includes>

+        </integrationUnitTest>

+

+        <resources>

+            <includes>

+                <include>conf/**/*pipeline.xml</include>

+                <include>conf/**/*valve.xml</include>

+            </includes>

+        </resources>

+

+        <jars/>

+

+    </build>

+

+    <reports>

+        <!--

+        <report>maven-jdepend-plugin</report>

+        -->

+        <report>maven-checkstyle-plugin</report>

+        <report>maven-changelog-plugin</report>

+        <report>maven-developer-activity-plugin</report>

+        <report>maven-file-activity-plugin</report>

+        <report>maven-javadoc-plugin</report>

+        <report>maven-jxr-plugin</report>

+        <!--

+        <report>maven-junit-report-plugin</report>

+        -->

+        <report>maven-tasklist-plugin</report>

+

+    </reports>

+

+</project>

diff --git a/src/webapp/WEB-INF/web.xml b/src/webapp/WEB-INF/web.xml
new file mode 100644
index 0000000..c3c69a8
--- /dev/null
+++ b/src/webapp/WEB-INF/web.xml
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>

+

+<!DOCTYPE web-app

+    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"

+           "http://java.sun.com/dtd/web-app_2_3.dtd">

+<!-- 

+Copyright 2004 The Apache Software Foundation.

+Licensed  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>

+

+    <display-name>Pluto Testsuite</display-name>

+

+    <context-param>

+        <param-name>test-parameter-name</param-name>

+        <param-value>test-parameter-val</param-value>

+    </context-param>

+

+    <context-param>

+        <param-name>parameter-name</param-name>

+        <param-value>parameter-value</param-value>

+    </context-param>

+

+    <servlet>

+        <servlet-class>org.apache.pluto.portalImpl.portlet.test.ExternalAppScopedAttributeTestCompanionServlet</servlet-class>

+        <servlet-name>extAppScopedTest</servlet-name>

+    </servlet>

+

+    <servlet>

+        <servlet-class>org.apache.pluto.core.PortletServlet</servlet-class>

+        <servlet-name>TestPortlet1</servlet-name>

+        <init-param>

+            <param-name>portlet-name</param-name>

+            <param-value>TestPortlet1</param-value>

+        </init-param>

+        <load-on-startup>1</load-on-startup>

+    </servlet>

+

+    <servlet>

+        <servlet-class>org.apache.pluto.core.PortletServlet</servlet-class>

+        <servlet-name>TestPortlet2</servlet-name>

+        <init-param>

+            <param-name>portlet-name</param-name>

+            <param-value>TestPortlet2</param-value>

+        </init-param>

+        <load-on-startup>1</load-on-startup>

+    </servlet>

+

+    <servlet-mapping>

+        <servlet-name>extAppScopedTest</servlet-name>

+        <url-pattern>/test/extAppScopedTest</url-pattern>

+    </servlet-mapping>

+

+    <servlet-mapping>

+        <servlet-name>TestPortlet1</servlet-name>

+        <url-pattern>/PlutoInvoker/TestPortlet1</url-pattern>

+    </servlet-mapping>

+

+    <servlet-mapping>

+        <servlet-name>TestPortlet2</servlet-name>

+        <url-pattern>/PlutoInvoker/TestPortlet2</url-pattern>

+    </servlet-mapping>

+

+    <security-role>

+        <role-name>tomcat</role-name>

+    </security-role>

+

+    <taglib>

+        <taglib-uri>http://java.sun.com/portlet</taglib-uri>

+        <taglib-location>/WEB-INF/tld/portlet.tld</taglib-location>

+    </taglib>

+</web-app>

+

diff --git a/testsuite.iml b/testsuite.iml
new file mode 100644
index 0000000..db8c063
--- /dev/null
+++ b/testsuite.iml
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>

+<module version="4" relativePaths="true" type="J2EE_WEB_MODULE" j2ee-integration="Tomcat Server">

+  <component name="ModuleRootManager" />

+  <component name="NewModuleRootManager">

+    <output url="file://$MODULE_DIR$/target/testsuite/WEB-INF/classes" />

+    <exclude-output />

+    <exploded url="file://$MODULE_DIR$/target/testsuite" />

+    <exclude-exploded />

+    <content url="file://$MODULE_DIR$">

+      <sourceFolder url="file://$MODULE_DIR$/src/java" isTestSource="false" />

+      <excludeFolder url="file://$MODULE_DIR$/target" />

+    </content>

+    <orderEntry type="inheritedJdk" />

+    <orderEntry type="sourceFolder" forTests="false" />

+    <orderEntry type="module" module-name="portal" />

+    <orderEntry type="module" module-name="container" />

+    <orderEntry type="library" name="portlet-api-1.0" level="application" />

+    <orderEntry type="library" name="servlet-api-2.3" level="application" />

+    <orderEntry type="library" name="jstl-standard-1.0.4" level="application" />

+    <orderEntry type="library" name="commons-digester-1.5" level="application" />

+    <orderEntry type="library" name="Tomcat" level="application_server_libraries" />

+    <orderEntryProperties />

+  </component>

+  <component name="WebModuleBuildComponent">

+    <setting name="EXPLODED_URL" value="file://$MODULE_DIR$/target/testsuite" />

+    <setting name="EXPLODED_ENABLED" value="true" />

+    <setting name="JAR_URL" value="file://" />

+    <setting name="JAR_ENABLED" value="false" />

+    <setting name="SYNC_EXPLODED_DIR" value="true" />

+    <setting name="BUILD_ON_FRAME_DEACTIVATION" value="false" />

+    <setting name="RUN_JASPER_VALIDATION" value="false" />

+  </component>

+  <component name="WebModuleProperties">

+    <containerElement type="module" name="portal">

+      <attribute name="method" value="4" />

+      <attribute name="URI" value="&lt;N/A&gt;" />

+    </containerElement>

+    <containerElement type="module" name="container">

+      <attribute name="method" value="1" />

+      <attribute name="URI" value="/WEB-INF/classes" />

+    </containerElement>

+    <containerElement type="library" level="application" name="commons-digester-1.5">

+      <attribute name="method" value="1" />

+      <attribute name="URI" value="/WEB-INF/lib" />

+    </containerElement>

+    <containerElement type="library" level="application" name="jstl-standard-1.0.4">

+      <attribute name="method" value="1" />

+      <attribute name="URI" value="/WEB-INF/lib" />

+    </containerElement>

+    <containerElement type="library" level="application" name="portlet-api-1.0">

+      <attribute name="method" value="1" />

+      <attribute name="URI" value="/WEB-INF/lib" />

+    </containerElement>

+    <deploymentDescriptor name="web.xml" url="file://$MODULE_DIR$/src/webapp/WEB-INF/web.xml" version="2.3" />

+    <webroots>

+      <root url="file://$MODULE_DIR$/src/webapp" relative="/" />

+    </webroots>

+  </component>

+  <component name="WeblogicWebModuleProperties">

+    <option name="IS_RUN_APPC" value="false" />

+  </component>

+</module>

+