| 1 |
<?xml version="1.0"?> |
|---|
| 2 |
|
|---|
| 3 |
<!-- =================================================================== |
|---|
| 4 |
This file is imported by buildwar.xml and adds a target |
|---|
| 5 |
doPortal |
|---|
| 6 |
which will be invoked by the buildwar targets. |
|---|
| 7 |
=================================================================== --> |
|---|
| 8 |
|
|---|
| 9 |
<project name="bedework.portalWar" default="doPortal" > |
|---|
| 10 |
<target name="doPortal" > |
|---|
| 11 |
<!-- Add common portlet files --> |
|---|
| 12 |
|
|---|
| 13 |
<copy todir="${app.dest.lib}" |
|---|
| 14 |
file="${org.bedework.appjar.portals-bridges-common}"/> |
|---|
| 15 |
<copy todir="${app.dest.lib}" |
|---|
| 16 |
file="${org.bedework.appjar.portals-bridges-struts-1.2.7}"/> |
|---|
| 17 |
|
|---|
| 18 |
<!-- Use generic bedework portlet tld --> |
|---|
| 19 |
<copy todir="${app.dest.webinf}/tlds" |
|---|
| 20 |
overwrite="yes" |
|---|
| 21 |
failonerror="no" > |
|---|
| 22 |
<fileset dir="${app.root.dir}/resources/portlet" > |
|---|
| 23 |
<include name="*.tld"/> |
|---|
| 24 |
</fileset> |
|---|
| 25 |
</copy> |
|---|
| 26 |
|
|---|
| 27 |
<copy todir="${app.dest.webinf}" |
|---|
| 28 |
file="${org.bedework.deploy.type.dir}/portlet/struts-portlet-config.xml" |
|---|
| 29 |
overwrite="yes" |
|---|
| 30 |
failonerror="no" /> |
|---|
| 31 |
|
|---|
| 32 |
<copy todir="${app.dest.webinf}" |
|---|
| 33 |
file="${org.bedework.deploy.type.dir}/portlet/portlet.xml" |
|---|
| 34 |
overwrite="yes" |
|---|
| 35 |
failonerror="no" > |
|---|
| 36 |
<filterset refid="property.filters" /> |
|---|
| 37 |
</copy> |
|---|
| 38 |
|
|---|
| 39 |
<!-- Add the portal bridge controller def --> |
|---|
| 40 |
<replace file="${app.dest.webinf}/struts-config.xml"> |
|---|
| 41 |
<replacetoken><![CDATA[<!-- portlet controller def here -->]]></replacetoken> |
|---|
| 42 |
<replacevalue><![CDATA[<controller pagePattern="$M$P" inputForward="true" |
|---|
| 43 |
processorClass="org.apache.portals.bridges.struts.PortletRequestProcessor"/>]]> |
|---|
| 44 |
</replacevalue> |
|---|
| 45 |
</replace> |
|---|
| 46 |
|
|---|
| 47 |
<!-- Add liferay config files --> |
|---|
| 48 |
<copy tofile="${app.dest.webinf}/liferay-display.xml" |
|---|
| 49 |
file="${org.bedework.deploy.type.dir}/portlet/liferay5-display.xml" |
|---|
| 50 |
overwrite="yes" |
|---|
| 51 |
failonerror="no" > |
|---|
| 52 |
<filterset refid="property.filters" /> |
|---|
| 53 |
</copy> |
|---|
| 54 |
|
|---|
| 55 |
<copy tofile="${app.dest.webinf}/liferay-portlet.xml" |
|---|
| 56 |
file="${org.bedework.deploy.type.dir}/portlet/liferay5-portlet.xml" |
|---|
| 57 |
overwrite="yes" |
|---|
| 58 |
failonerror="no" > |
|---|
| 59 |
<filterset refid="property.filters" /> |
|---|
| 60 |
</copy> |
|---|
| 61 |
|
|---|
| 62 |
<copy todir="${app.dest.lib}" file="${org.bedework.appjar.liferay.util-taglib}"/> |
|---|
| 63 |
<copy todir="${app.dest.lib}" file="${org.bedework.appjar.liferay.util-bridges}"/> |
|---|
| 64 |
<copy todir="${app.dest.lib}" file="${org.bedework.appjar.liferay.util-java}"/> |
|---|
| 65 |
|
|---|
| 66 |
<!-- Add the context params --> |
|---|
| 67 |
<replace file="${app.temp.web.xml}"> |
|---|
| 68 |
<replacetoken><![CDATA[<!-- add context params here -->]]></replacetoken> |
|---|
| 69 |
<replacevalue><![CDATA[<!-- add context params here --> |
|---|
| 70 |
|
|---|
| 71 |
<context-param> |
|---|
| 72 |
<param-name>company_id</param-name> |
|---|
| 73 |
<param-value>@LIFERAY-COMPANY-ID@</param-value> |
|---|
| 74 |
</context-param>]]> |
|---|
| 75 |
</replacevalue> |
|---|
| 76 |
</replace> |
|---|
| 77 |
|
|---|
| 78 |
<!-- Add the portal listener --> |
|---|
| 79 |
<replace file="${app.temp.web.xml}"> |
|---|
| 80 |
<replacetoken><![CDATA[<!-- add listeners here -->]]></replacetoken> |
|---|
| 81 |
<replacevalue><![CDATA[<!-- add listeners here --> |
|---|
| 82 |
|
|---|
| 83 |
<listener> |
|---|
| 84 |
<listener-class> |
|---|
| 85 |
@PORTAL-SERVLET-CONTEXT-LISTENER@ |
|---|
| 86 |
</listener-class> |
|---|
| 87 |
</listener>]]> |
|---|
| 88 |
</replacevalue> |
|---|
| 89 |
</replace> |
|---|
| 90 |
|
|---|
| 91 |
<!-- Add the portlet servlet definition --> |
|---|
| 92 |
<replace file="${app.temp.web.xml}"> |
|---|
| 93 |
<replacetoken><![CDATA[<!-- add servlet definitions here -->]]></replacetoken> |
|---|
| 94 |
<replacevalue><![CDATA[<!-- add servlet definitions here --> |
|---|
| 95 |
|
|---|
| 96 |
<!-- Servlet definition for portlet use. --> |
|---|
| 97 |
<servlet> |
|---|
| 98 |
<servlet-name>@PORTLET-NAME@</servlet-name> |
|---|
| 99 |
<display-name>@PORTLET-NAME@ Wrapper</display-name> |
|---|
| 100 |
<servlet-class>@PORTLET-SERVLET-CLASS@</servlet-class> |
|---|
| 101 |
<init-param> |
|---|
| 102 |
<param-name>portlet-class</param-name> |
|---|
| 103 |
<param-value>@PORTLET-CLASS@</param-value> |
|---|
| 104 |
</init-param> |
|---|
| 105 |
<init-param> |
|---|
| 106 |
<param-name>portlet-guid</param-name> |
|---|
| 107 |
<param-value>@CONTEXT-ROOT@.@PORTLET-NAME@</param-value> |
|---|
| 108 |
</init-param> |
|---|
| 109 |
</servlet>]]> |
|---|
| 110 |
</replacevalue> |
|---|
| 111 |
</replace> |
|---|
| 112 |
|
|---|
| 113 |
<!-- Add the portlet servlet mapping --> |
|---|
| 114 |
<replace file="${app.temp.web.xml}"> |
|---|
| 115 |
<replacetoken><![CDATA[<!-- add servlet mappings here -->]]></replacetoken> |
|---|
| 116 |
<replacevalue><![CDATA[<!-- add servlet mappings here --> |
|---|
| 117 |
|
|---|
| 118 |
<servlet-mapping> |
|---|
| 119 |
<servlet-name>@PORTLET-NAME@</servlet-name> |
|---|
| 120 |
<url-pattern>/@PORTLET-NAME@/*</url-pattern> |
|---|
| 121 |
</servlet-mapping>]]> |
|---|
| 122 |
</replacevalue> |
|---|
| 123 |
</replace> |
|---|
| 124 |
</target> |
|---|
| 125 |
</project> |
|---|