Changeset 597

Show
Ignore:
Timestamp:
06/19/06 00:49:30
Author:
douglm
Message:

Further uportal changes:

This allows building of the public events client as a uportal jsr168 portlet.

Instructions to follow. Changes are:

Add file missed in previous change

Change deployment/build.xml to add property org.bedework.deploy.type.dir
defining directory for type of application being built.

Add uportal2 target to bldfiles/buildwar.xml - needs application property portal.platform

Change webclient/war/WEB-INF/publicweb.xml to add servlet class and genurl tokens.

Create deployment/webpublic/uportal2 and add portlet.xml struts-portlet-config.xml

Add commons-collections to war for hibernate - define in defjars

servlet-jsp.jar should not be included in deployment. Probably needs upgrading for build
Enable pagecontext flush in footer

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/calendar3/bldfiles/buildwar.xml

    r531 r597  
    1313     Properties which must be defined on entry, apart from those described 
    1414     in the main build file are: 
    15     app.root.dir       Location of the root directory for the apps - 
    16                        appsuite or uwcalapps probably 
    17     app.sou.dir        Location of the application skeleton, e.g. 
    18                        appsuite/admin 
     15    app.root.dir       Location of the root directory for the apps 
     16    app.sou.dir        Location of the application skeleton, 
    1917    app.name           Name of the application. This wil be used to determine 
    2018                       the name of the file containing the rest of the 
     
    4240     =================================================================== --> 
    4341 
    44 <project name="uwcal.buildwar" default="build" > 
    45   <target name="init" depends="init.common,init.j2ee,init.standalone" /> 
     42<project name="bedework.buildwar" default="build" > 
     43  <target name="init" depends="init.common,init.uportal2,init.j2ee,init.standalone" /> 
    4644 
    4745  <target name="init.common"> 
    4846    <condition property="org.bedework.build.for.jetspeed2"> 
    49       <equals arg1="jetspeed2" arg2="${propval.portal.platform}"/> 
     47      <equals arg1="jetspeed2" arg2="${propval.app.portal.platform}"/> 
     48    </condition> 
     49 
     50    <condition property="org.bedework.build.for.uportal2"> 
     51      <equals arg1="uportal2" arg2="${propval.app.portal.platform}"/> 
    5052    </condition> 
    5153 
     
    8082  </target> 
    8183 
     84  <target name="init.uportal2" if="org.bedework.build.for.uportal2" > 
     85    <property name="propval.app.servlet.class" 
     86              value="org.apache.portals.bridges.struts.PortletServlet" /> 
     87 
     88    <property name="propval.app.ignoreContentType" 
     89              value="true" /> 
     90 
     91    <property name="propval.app.genurl.taglib.tld" 
     92              value="struts-portlet.tld" /> 
     93  </target> 
     94 
    8295  <target name="init.standalone" if="org.bedework.global.build.standalone.app"> 
     96    <property name="propval.app.servlet.class" 
     97              value="org.apache.struts.action.ActionServlet" /> 
     98 
     99    <property name="propval.app.ignoreContentType" 
     100              value="false" /> 
     101 
     102    <property name="propval.app.portlet.mapping" value="" /> 
     103 
     104    <property name="propval.app.genurl.taglib.tld" 
     105              value="struts-html.tld" /> 
     106 
    83107    <property name="app.dest.lib" 
    84108              location="${app.dest.webinf}/lib" /> 
     
    122146              value="${org.bedework.global.directory.browsing.disallowed}" /> 
    123147 
     148      <filter token="IGNORE-CONTENT-TYPE" 
     149              value="${propval.app.ignoreContentType}" /> 
     150 
    124151      <filter token="APP-DESCRIPTION" 
    125152              value="${propval.app.description}" /> 
     153 
     154      <filter token="SERVLET-CLASS" 
     155              value="${propval.app.servlet.class}"/> 
     156 
     157      <filter token="GENURL-TAGLIB-TLD" 
     158              value="${propval.app.genurl.taglib.tld}"/> 
    126159 
    127160      <filter token="SECURITY-DOMAIN" 
     
    165198 
    166199    <available file="${app.sou.dir}/properties" type="dir" 
    167                property="uwcal.properties.dir.exists" /> 
     200               property="org.bedework.properties.dir.exists" /> 
    168201 
    169202    <available file="${app.sou.properties}" type="file" 
    170                property="uwcal.servlet.properties.exists" /> 
     203               property="org.bedework.servlet.properties.exists" /> 
    171204 
    172205    <available file="${app.sou.dir}/war/docs" type="dir" 
    173                property="uwcal.war.docs.exists" /> 
     206               property="org.bedework.war.docs.exists" /> 
    174207 
    175208    <antcall target="copy.properties" inheritRefs="true" /> 
     
    244277    <copy todir="${app.dest.lib}" file="${log4j.jar}"/> 
    245278    <copy todir="${app.dest.lib}" file="${ical4j.jar}"/> 
     279    <copy todir="${app.dest.lib}" file="${commons-collections.jar}"/> 
    246280 
    247281    <!-- add the jdbcdriver if defined --> 
     
    272306  </target> 
    273307 
    274   <target name="copy.properties" if="uwcal.properties.dir.exists"> 
     308  <target name="copy.properties" if="org.bedework.properties.dir.exists"> 
    275309    <!-- =============================================================== 
    276310         Any property files we need for configuration, other than the 
     
    286320  </target> 
    287321 
    288   <target name="copy.servlet.properties" if="uwcal.servlet.properties.exists"> 
     322  <target name="copy.servlet.properties" if="org.bedework.servlet.properties.exists"> 
    289323    <copy tofile="${app.dest.classes}/servlet.properties" file="${app.sou.properties}"> 
    290324      <filterset refid="property.filters" /> 
     
    292326  </target> 
    293327 
    294   <target name="copy.war.docs" if="uwcal.war.docs.exists"> 
     328  <target name="copy.war.docs" if="org.bedework.war.docs.exists"> 
    295329    <copy todir="${app.dest.docs}"> 
    296330      <fileset dir="${app.sou.dir}/war/docs" /> 
     
    326360    <antcall target="add.xalan" inheritRefs="true" /> 
    327361    <antcall target="add.jetspeed2" inheritRefs="true" /> 
     362    <antcall target="add.uportal2" inheritRefs="true" /> 
    328363 
    329364    <copy todir="${app.dest.lib}"> 
     
    340375    <copy todir="${app.dest.lib}" file="${commons-validator.jar}"/> 
    341376    <copy todir="${app.dest.lib}" file="${jakarta-oro.jar}"/> 
    342  
    343     <copy todir="${app.dest.lib}" file="${servlet.jsp.jar}"/> 
    344377  </target> 
    345378 
    346379  <target name="add.jetspeed2" if="org.bedework.build.for.jetspeed2" > 
    347380    <copy todir="${app.dest.webinf}" 
    348           file="${org.bedework.portal.resources.dir}/jetspeed2/${propval.app.war.name}/portlet.xml" 
     381          file="${org.bedework.deploy.type.dir}/jetspeed2/${propval.app.war.name}/portlet.xml" 
    349382          overwrite="yes" 
    350383          failonerror="no" /> 
    351384    <copy todir="${app.dest.webinf}" 
    352           file="${org.bedework.portal.resources.dir}/jetspeed2/struts-portlet-config.xml" 
     385          file="${org.bedework.deploy.type.dir}/jetspeed2/struts-portlet-config.xml" 
    353386          overwrite="yes" 
    354387          failonerror="no" /> 
     
    364397        <include name="*.tld"/> 
    365398      </fileset> 
    366     </copy> 
    367  
    368     <!-- Overwrite the web.xml file --> 
    369     <copy tofile="${app.dest.web.xml}" 
    370           file="${org.bedework.portal.resources.dir}/jetspeed2/web.xml" 
    371           overwrite="yes" > 
    372       <filterset> 
    373         <filter token="RPI-DEBUG" value="${app.debug.val}"/> 
    374       </filterset> 
    375       <filterset refid="property.filters" /> 
    376399    </copy> 
    377400 
     
    385408  </target> 
    386409 
     410  <target name="add.uportal2" if="org.bedework.build.for.uportal2" > 
     411    <copy todir="${app.dest.webinf}" 
     412          file="${org.bedework.deploy.type.dir}/uportal2/portlet.xml" 
     413          overwrite="yes" 
     414          failonerror="no" /> 
     415    <copy todir="${app.dest.webinf}" 
     416          file="${org.bedework.deploy.type.dir}/uportal2/struts-portlet-config.xml" 
     417          overwrite="yes" 
     418          failonerror="no" /> 
     419 
     420    <copy todir="${app.dest.lib}" > 
     421      <fileset dir="${portals-bridges.jars.dir}"> 
     422        <include name="*.jar"/> 
     423      </fileset> 
     424    </copy> 
     425 
     426    <copy todir="${app.dest.webinf}/tlds" 
     427          overwrite="yes" 
     428          failonerror="no" > 
     429      <fileset dir="${org.bedework.deploy.type.dir}/uportal2" > 
     430        <include name="*.tld"/> 
     431      </fileset> 
     432    </copy> 
     433 
     434    <copy todir="${app.dest.lib}" file="${org.bedework.uportal.jar}" /> 
     435 
     436    <!-- Add the portlet servelt mapping --> 
     437    <replace file="${app.dest.webinf}/web.xml"> 
     438      <replacetoken><![CDATA[<!-- uPortal2 portlet servlet mapping here -->]]></replacetoken> 
     439      <replacevalue><![CDATA[<servlet-mapping> 
     440    <servlet-name>@PORTLET-NAME@</servlet-name> 
     441    <url-pattern>/@PORTLET-NAME@/*</url-pattern> 
     442  </servlet-mapping>]]> 
     443      </replacevalue> 
     444    </replace> 
     445 
     446    <replace file="${app.dest.webinf}/web.xml"> 
     447      <replacefilter token="@PORTLET-NAME@" value="${propval.app.portlet.name}"/> 
     448    </replace> 
     449 
     450    <!-- Add the portal bridge controller def --> 
     451    <replace file="${app.dest.webinf}/struts-config.xml"> 
     452      <replacetoken><![CDATA[<!-- Jetspeed2 controller def here -->]]></replacetoken> 
     453      <replacevalue><![CDATA[<controller pagePattern="$M$P" inputForward="true" 
     454              processorClass="org.apache.portals.bridges.struts.PortletRequestProcessor"/>]]> 
     455      </replacevalue> 
     456    </replace> 
     457  </target> 
     458 
    387459  <target name="add.xalan" unless="xalan.in.tomcat.common.endorsed" > 
    388460    <copy todir="${app.dest.lib}" file="${xalan.jar}"/> 
  • trunk/calendar3/bldfiles/defjars.properties

    r594 r597  
    6868commons-codec.jar=${commons.dir}/commons-codec-1.3.jar 
    6969 
     70#      commons-collections.jar    Used by hibernate. 
     71commons-collections.jar=${commons.dir}/commons-collections.jar 
     72 
    7073#      commons-fileupload.jar    Used for struts 
    7174commons-fileupload.jar=${commons.dir}/commons-fileupload.jar 
  • trunk/calendar3/deployment/build.xml

    r589 r597  
    228228 
    229229    <!-- ======================= termination tasks ================= --> 
    230     <ant antfile="${org.bedework.deployment.base}/termination/${org.bedework.deploy.kind}/build.xml" 
     230    <property name="org.bedework.deploy.type.dir" 
     231              location="${org.bedework.deployment.base}/termination" /> 
     232 
     233    <ant antfile="${org.bedework.deploy.type.dir}/${org.bedework.deploy.kind}/build.xml" 
    231234         inheritrefs="true" target="build.configured" /> 
    232235  </target> 
     
    240243    </propertyset> 
    241244 
    242     <ant antfile="${org.bedework.deployment.base}/${org.bedework.deploy.type}/${org.bedework.deploy.kind}/build.xml" 
     245    <property name="org.bedework.deploy.type.dir" 
     246              location="${org.bedework.deployment.base}/termination" /> 
     247 
     248    <ant antfile="${org.bedework.deploy.type.dir}/${org.bedework.deploy.kind}/build.xml" 
    243249         inheritrefs="true" target="build.configured" > 
    244250      <propertyset refid="app-properties" /> 
     
    256262 
    257263    <!-- ======================= termination tasks ================= --> 
    258     <ant antfile="${org.bedework.deployment.base}/termination/${org.bedework.deploy.kind}/build.xml" 
     264    <property name="org.bedework.deploy.type.dir" 
     265              location="${org.bedework.deployment.base}/termination" /> 
     266 
     267    <ant antfile="${org.bedework.deploy.type.dir}/${org.bedework.deploy.kind}/build.xml" 
    259268         inheritrefs="true" target="deploy" /> 
    260269  </target> 
     
    262271  <target name="wrap.deploy.available.app"> 
    263272    <!-- just to make app.kind.available go away --> 
    264     <available file="${org.bedework.deployment.base}/${org.bedework.deploy.type}/${org.bedework.deploy.kind}/build.xml" 
     273    <property name="org.bedework.deploy.type.dir" 
     274              location="${org.bedework.deployment.base}/${org.bedework.deploy.type}" /> 
     275 
     276    <available file="${org.bedework.deploy.type.dir}/${org.bedework.deploy.kind}/build.xml" 
    265277               property="app.kind.available" /> 
     278 
    266279    <antcall target="deploy.available.app" inheritrefs="true" /> 
    267280  </target> 
     
    273286    </propertyset> 
    274287 
    275     <ant antfile="${org.bedework.deployment.base}/${org.bedework.deploy.type}/${org.bedework.deploy.kind}/build.xml" 
     288    <property name="org.bedework.deploy.type.dir" 
     289              location="${org.bedework.deployment.base}/${org.bedework.deploy.type}" /> 
     290 
     291    <ant antfile="${org.bedework.deploy.type.dir}/${org.bedework.deploy.kind}/build.xml" 
    276292         inheritrefs="true" target="deploy" > 
    277293      <propertyset refid="app-properties" /> 
  • trunk/calendar3/webclient/war/WEB-INF/publicweb.xml

    r312 r597  
    11<?xml version="1.0" encoding="ISO-8859-1"?> 
    22 
    3 <!-- guest/web.xml and user/web.xml in uwcalxml should be 
     3<!-- publicweb.xml and userweb.xml should be 
    44     identical except for the security piece. 
    55  --> 
     
    1010         http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" 
    1111         version="2.4"> 
    12   <display-name>UWCal public client</display-name> 
     12  <display-name>Bedwork public client</display-name> 
    1313 
    1414  <context-param> 
     
    3737      <param-name>directoryBrowsingDisallowed</param-name> 
    3838      <param-value>@DIRECTORY-BROWSING-DISALLOWED@</param-value> 
     39    </init-param> 
     40    <init-param> 
     41      <param-name>ignoreContentType</param-name> 
     42      <param-value>@IGNORE-CONTENT-TYPE@</param-value> 
    3943    </init-param> 
    4044  </filter> 
     
    103107    <servlet-name>action</servlet-name> 
    104108    <servlet-class> 
    105       org.apache.struts.action.ActionServlet 
     109      @SERVLET-CLASS@ 
    106110    </servlet-class> 
    107111 
    108112    <load-on-startup>1</load-on-startup> 
     113  </servlet> 
     114 
     115  <!-- Servlet definition for portlet use. uportal only at the moment --> 
     116  <servlet> 
     117    <servlet-name>@PORTLET-NAME@</servlet-name> 
     118    <display-name>@PORTLET-NAME@ Wrapper</display-name> 
     119    <servlet-class>org.apache.pluto.core.PortletServlet</servlet-class> 
     120    <init-param> 
     121      <param-name>portlet-class</param-name> 
     122      <param-value>org.apache.portals.bridges.struts.StrutsPortlet</param-value> 
     123    </init-param> 
     124    <init-param> 
     125      <param-name>portlet-guid</param-name> 
     126      <param-value>@CONTEXT-ROOT@.@PORTLET-NAME@</param-value> 
     127    </init-param> 
    109128  </servlet> 
    110129 
     
    118137    <url-pattern>*.do</url-pattern> 
    119138  </servlet-mapping> 
     139 
     140  <!-- uPortal2 portlet servlet mapping here --> 
    120141 
    121142  <session-config> 
     
    143164      <taglib-location>/WEB-INF/tlds/struts-html.tld</taglib-location> 
    144165    </taglib> 
    145     <!-- use html struts tag library for genurl --> 
     166 
    146167    <taglib> 
    147168      <taglib-uri>struts-genurl</taglib-uri> 
    148       <taglib-location>/WEB-INF/tlds/struts-html.tld</taglib-location> 
    149     </taglib> 
     169      <taglib-location>/WEB-INF/tlds/@GENURL-TAGLIB-TLD@</taglib-location> 
     170    </taglib> 
     171 
    150172    <taglib> 
    151173      <taglib-uri>struts-logic</taglib-uri> 
     
    160182      <taglib-uri>bedework</taglib-uri> 
    161183      <taglib-location>/WEB-INF/tlds/bedework.tld</taglib-location> 
     184    </taglib> 
     185 
     186    <!-- Only used for portlet --> 
     187    <taglib> 
     188        <taglib-uri>http://java.sun.com/portlet</taglib-uri> 
     189        <taglib-location>/WEB-INF/tlds/pluto-portlet.tld</taglib-location> 
    162190    </taglib> 
    163191  </jsp-config> 
  • trunk/calendar3/webclient/war/docs/footer.jsp

    r292 r597  
    8080%> 
    8181 
    82 <%-- Required to force write in jetspeed2 portal-struts bridge 
    83 < % pageContext.getOut().flush(); % > 
    84 --%> 
     82<%-- Required to force write in portal-struts bridge --%> 
     83<% pageContext.getOut().flush(); %> 
    8584