You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pluto-scm@portals.apache.org by nl...@apache.org on 2004/11/21 08:50:49 UTC
svn commit: r106080 - /portals/pluto/trunk/portlet-deploy /portals/pluto/trunk/portlet-deploy/README.txt /portals/pluto/trunk/portlet-deploy/build.properties /portals/pluto/trunk/portlet-deploy/build.xml /portals/pluto/trunk/portlet-deploy/lib /portals/pluto/trunk/portlet-deploy/portal /portals/pluto/trunk/portlet-deploy/portal/src /portals/pluto/trunk/portlet-deploy/portal/src/webapp /portals/pluto/trunk/portlet-deploy/portal/src/webapp/WEB-INF /portals/pluto/trunk/portlet-deploy/portal/src/webapp/WEB-INF/tld /portals/pluto/trunk/portlet-deploy/portal/src/webapp/WEB-INF/tld/portlet.tld /portals/pluto/trunk/portlet-deploy/portal/src/webapp/WEB-INF/web.xml
Author: nlothian
Date: Sat Nov 20 23:50:48 2004
New Revision: 106080
Added:
portals/pluto/trunk/portlet-deploy/
portals/pluto/trunk/portlet-deploy/README.txt
portals/pluto/trunk/portlet-deploy/build.properties
portals/pluto/trunk/portlet-deploy/build.xml
portals/pluto/trunk/portlet-deploy/lib/
portals/pluto/trunk/portlet-deploy/portal/
portals/pluto/trunk/portlet-deploy/portal/src/
portals/pluto/trunk/portlet-deploy/portal/src/webapp/
portals/pluto/trunk/portlet-deploy/portal/src/webapp/WEB-INF/
portals/pluto/trunk/portlet-deploy/portal/src/webapp/WEB-INF/tld/
portals/pluto/trunk/portlet-deploy/portal/src/webapp/WEB-INF/tld/portlet.tld
portals/pluto/trunk/portlet-deploy/portal/src/webapp/WEB-INF/web.xml
Log:
JIRA PLUTO-72: Ant script to deploy portlet applications.
Added: portals/pluto/trunk/portlet-deploy/README.txt
==============================================================================
--- (empty file)
+++ portals/pluto/trunk/portlet-deploy/README.txt Sat Nov 20 23:50:48 2004
@@ -0,0 +1 @@
+build.xml is an ant script that can be used to deploy portlet applications to Pluto
\ No newline at end of file
Added: portals/pluto/trunk/portlet-deploy/build.properties
==============================================================================
--- (empty file)
+++ portals/pluto/trunk/portlet-deploy/build.properties Sat Nov 20 23:50:48 2004
@@ -0,0 +1,8 @@
+#build.properties
+#Use this file to override any properties in build.xml or
+#set new properties.
+
+#Full path to the war file to be deployed (including file name)
+#Uncomment to set the property instead of using the input task
+#in the get-war-path target
+#full.war.path=
\ No newline at end of file
Added: portals/pluto/trunk/portlet-deploy/build.xml
==============================================================================
--- (empty file)
+++ portals/pluto/trunk/portlet-deploy/build.xml Sat Nov 20 23:50:48 2004
@@ -0,0 +1,133 @@
+<!--
+ Ant build file for deploying individual portlets to the binary distribution
+ (which includes Tomcat 5) of Pluto ver 1.0.1. Release Candidate.
+
+ This script depends on setting the CATALINA_HOME to the full
+ path to where the pluto-1.0.1 binary distribution is installed.
+
+ Run this build inputing the path to the war file (including file name)
+ when prompted by the input task or using the full command line:
+ ant -Dfull.war.path=<path_to_war_file>. Alternatively,
+ you can set the full.war.path property in build.properties.
+
+ Use Ant version 1.6+ to run this build.
+
+ Here's how to call this script inside of your portlet application Ant build:
+ <target name="deploy-pluto" description="Deploy portlet application to Pluto" depends="war">
+ <ant dir="${env.CATALINA_HOME}/portlet-deploy" inheritall="false">
+ <property name="full.war.path" value="${basedir}/${war.name}"/>
+ </ant>
+ </target>
+ Setting the full.war.path property inside this ant task causes the input task to be
+ skipped inside of the get-war-path target of this file.
+
+
+ author: Craig Doremus (craig-at-maine.com)
+-->
+<project default="deploy" name="portlet-deploy" basedir=".">
+
+ <property environment="env" description="To pick up environmental variables"/>
+ <property file="build.properties" description="Properties file"/>
+ <property name="this.dir" value="portlet-deploy" description="Current directory"/>
+ <property name="pluto-context" value="pluto" description="Web context name for pluto webapp"/>
+ <property name="lib.dir" value="lib" description="Holds libraries used for deployment"/>
+
+
+ <path description="Deployent classpath" id="deploy.classpath">
+ <pathelement location="${env.CATALINA_HOME}/webapps/${pluto-context}/WEB-INF/classes"/>
+ <fileset dir="${lib.dir}">
+ <include name="*.*"/>
+ </fileset>
+ <fileset dir="${env.CATALINA_HOME}/shared/lib">
+ <!-- <include name="pluto-1.0.1.jar"/> -->
+ <include name="pluto-*.jar"/>
+ <include name="portlet-api-1.0.jar"/>
+ </fileset>
+ </path>
+
+ <target name="init">
+ <fail unless="env.CATALINA_HOME"
+ message="CATALINA_HOME must be set to the Tomcat installation home directory"/>
+ <property name="tomcat.home" value="${env.CATALINA_HOME}"/>
+ <echo>
+ Pluto version 1.0.1 deployment build
+ This script deploys a portlet application packaged
+ in a war file with a proper web.xml and portlet.xml file.
+ Pluto installation home: ${tomcat.home}
+ </echo>
+ <mkdir dir="${lib.dir}" description="Creates dir for libraries, if it is not present"/>
+ <!--
+ Check if dependencies are available.
+ -->
+ <condition property="noget">
+ <and>
+ <available filepath="${lib.dir}" file="castor-0.9.5.jar" />
+ <available filepath="${lib.dir}" file="regexp-1.3-dev.jar" />
+ <available filepath="${lib.dir}" file="servletapi-2.3.jar" />
+ <available filepath="${lib.dir}" file="xerces-2.4.0.jar" />
+ <available filepath="${lib.dir}" file="xml-apis-2.0.2.jar" />
+ </and>
+ </condition>
+
+ </target>
+
+ <target name="get-war-path" depends="init,get-deps">
+ <input
+ message="Enter the full path to the portlet war file (including file name):"
+ addproperty="full.war.path"/>
+
+ </target>
+
+ <target name="deploy-portlet-war" depends="get-war-path">
+ <!-- Check that the file that is the value of full.war.path exists -->
+ <condition property="path.set" value="true">
+ <and>
+ <isset property="full.war.path"/>
+ <not>
+ <equals arg1="${full.war.path}" arg2="" trim="true"/>
+ </not>
+ <available file="${full.war.path}"/>
+ </and>
+ </condition>
+ <fail message="The property full.war.path has not been set or the war file does not exist."
+ unless="path.set"/>
+
+ <echo message="File to be deployed: ${full.war.path}"/>
+ <!-- Run the deploy class -->
+ <java classname="org.apache.pluto.portalImpl.Deploy" fork="yes">
+ <classpath>
+ <path refid="deploy.classpath"/>
+ </classpath>
+ <arg value="${tomcat.home}/webapps" />
+ <arg value="pluto" />
+ <arg value="${full.war.path}" />
+ <arg value="${basedir}" />
+ </java>
+ </target>
+
+ <target name="deploy" depends="deploy-portlet-war">
+ <echo>
+ Deployment done!
+ If this is the first time you have done the deployment,
+ please make sure you edit portletentityregistry.xml and
+ pageregistry.xml in ${tomcat.home}/webapps/pluto/WEB-INF/data
+ to register your portlet with Pluto and add it to
+ the page layout.
+ </echo>
+ </target>
+
+
+ <target name="get-deps" unless="noget">
+ <get dest="${lib.dir}/castor-0.9.5.jar" usetimestamp="true" ignoreerrors="false" src="http://www.ibiblio.org/maven/castor/jars/castor-0.9.5.jar">
+ </get>
+ <get dest="${lib.dir}/regexp-1.3-dev.jar" usetimestamp="true" ignoreerrors="false" src="http://www.ibiblio.org/maven/regexp/jars/regexp-1.3-dev.jar">
+ </get>
+ <get dest="${lib.dir}/servletapi-2.3.jar" usetimestamp="true" ignoreerrors="false" src="http://www.ibiblio.org/maven/servletapi/jars/servletapi-2.3.jar">
+ </get>
+ <get dest="${lib.dir}/xerces-2.4.0.jar" usetimestamp="true" ignoreerrors="false" src="http://www.ibiblio.org/maven/xerces/jars/xerces-2.4.0.jar">
+ </get>
+ <get dest="${lib.dir}/xml-apis-2.0.2.jar" usetimestamp="true" ignoreerrors="false" src="http://www.ibiblio.org/maven/xml-apis/jars/xml-apis-2.0.2.jar">
+ </get>
+ </target>
+
+</project>
Added: portals/pluto/trunk/portlet-deploy/portal/src/webapp/WEB-INF/tld/portlet.tld
==============================================================================
--- (empty file)
+++ portals/pluto/trunk/portlet-deploy/portal/src/webapp/WEB-INF/tld/portlet.tld Sat Nov 20 23:50:48 2004
@@ -0,0 +1,104 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE taglib PUBLIC
+ "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN"
+ "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.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.
+-->
+<taglib>
+ <tlibversion>1.0</tlibversion>
+ <jspversion>1.1</jspversion>
+ <shortname>portlet</shortname>
+ <uri>http://java.sun.com/portlet</uri>
+ <tag>
+ <name>defineObjects</name>
+ <tagclass>org.apache.pluto.tags.DefineObjectsTag</tagclass>
+ <teiclass>org.apache.pluto.tags.DefineObjectsTag$TEI</teiclass>
+ <bodycontent>empty</bodycontent>
+ </tag>
+ <tag>
+ <name>param</name>
+ <tagclass>org.apache.pluto.tags.ParamTag</tagclass>
+ <bodycontent>empty</bodycontent>
+ <attribute>
+ <name>name</name>
+ <required>true</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <name>value</name>
+ <required>true</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ </tag>
+ <tag>
+ <name>actionURL</name>
+ <tagclass>org.apache.pluto.tags.ActionURLTag</tagclass>
+ <teiclass>org.apache.pluto.tags.BasicURLTag$TEI</teiclass>
+ <bodycontent>JSP</bodycontent>
+ <attribute>
+ <name>windowState</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <name>portletMode</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <name>secure</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <name>var</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ </tag>
+ <tag>
+ <name>renderURL</name>
+ <tagclass>org.apache.pluto.tags.RenderURLTag</tagclass>
+ <teiclass>org.apache.pluto.tags.BasicURLTag$TEI</teiclass>
+ <bodycontent>JSP</bodycontent>
+ <attribute>
+ <name>windowState</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <name>portletMode</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <name>secure</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <name>var</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ </tag>
+ <tag>
+ <name>namespace</name>
+ <tagclass>org.apache.pluto.tags.NamespaceTag</tagclass>
+ <bodycontent>empty</bodycontent>
+ </tag>
+</taglib>
\ No newline at end of file
Added: portals/pluto/trunk/portlet-deploy/portal/src/webapp/WEB-INF/web.xml
==============================================================================
--- (empty file)
+++ portals/pluto/trunk/portlet-deploy/portal/src/webapp/WEB-INF/web.xml Sat Nov 20 23:50:48 2004
@@ -0,0 +1,76 @@
+<?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 Reference Implementation</display-name>
+
+ <servlet>
+ <servlet-name>pluto</servlet-name>
+ <display-name>Pluto Driver</display-name>
+ <servlet-class>org.apache.pluto.portalImpl.Servlet</servlet-class>
+ <!-- Uncomment the following to allow for non latin-1 character sets in output. -->
+ <!--
+ <init-param>
+ <param-name>charset</param-name>
+ <param-value>utf-8</param-value>
+ </init-param>
+ -->
+ </servlet>
+ <servlet>
+ <servlet-name>TCKDriver</servlet-name>
+ <display-name>TCK Servlet</display-name>
+ <description>Test servlet for TCK Tests</description>
+ <servlet-class>org.apache.pluto.portalImpl.servlet.TCKdriver</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>pluto</servlet-name>
+ <url-pattern>/portal/*</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>TCKDriver</servlet-name>
+ <url-pattern>/tck/*</url-pattern>
+ </servlet-mapping>
+
+ <security-constraint>
+ <web-resource-collection>
+ <web-resource-name></web-resource-name>
+ <url-pattern>/login_success.jsp</url-pattern>
+ <http-method>GET</http-method>
+ <http-method>POST</http-method>
+ <http-method>PUT</http-method>
+ </web-resource-collection>
+ <auth-constraint>
+ <role-name>tomcat</role-name>
+ </auth-constraint>
+ </security-constraint>
+
+ <login-config>
+ <auth-method>BASIC</auth-method>
+ </login-config>
+
+ <security-role>
+ <role-name>tomcat</role-name>
+ </security-role>
+
+</web-app>
+