root/trunk/build/portals/liferay4War.xml

Revision 1937 (checked in by douglm, 5 years ago)

Major reorganization of the build process mostly affecting handling of portal builds.

Removed portal specific directories from teh deployment directory.

Removed portal sepcific code from buildwar.xml and added new portal specific files to be imported. These are in a section of teh bwbuild config directory.

All portal customization is now part of building the war file.

Line 
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
49     <copy tofile="${app.dest.webinf}/liferay-display.xml"
50           file="${org.bedework.deploy.type.dir}/portlet/liferay4-display.xml"
51           overwrite="yes"
52           failonerror="no" >
53       <filterset refid="property.filters" />
54     </copy>
55
56     <copy tofile="${app.dest.webinf}/liferay-portlet.xml"
57           file="${org.bedework.deploy.type.dir}/portlet/liferay4-portlet.xml"
58           overwrite="yes"
59           failonerror="no" >
60       <filterset refid="property.filters" />
61     </copy>
62
63     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.liferay}"/>
64     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.liferay.util-bridges}"/>
65     <copy todir="${app.dest.lib}" file="${org.bedework.appjar.liferay.util-java}"/>
66
67     <!-- Add the context params -->
68     <replace file="${app.temp.web.xml}">
69       <replacetoken><![CDATA[<!-- add context params here -->]]></replacetoken>
70       <replacevalue><![CDATA[<!-- add context params here -->
71
72   <context-param>
73     <param-name>company_id</param-name>
74     <param-value>@LIFERAY-COMPANY-ID@</param-value>
75   </context-param>]]>
76       </replacevalue>
77     </replace>
78
79     <!-- Add the portal listener -->
80     <replace file="${app.temp.web.xml}">
81       <replacetoken><![CDATA[<!-- add listeners here -->]]></replacetoken>
82       <replacevalue><![CDATA[<!-- add listeners here -->
83
84   <listener>
85     <listener-class>
86       @PORTAL-SERVLET-CONTEXT-LISTENER@
87     </listener-class>
88   </listener>]]>
89       </replacevalue>
90     </replace>
91
92     <!-- Add the portlet servlet definition -->
93     <replace file="${app.temp.web.xml}">
94       <replacetoken><![CDATA[<!-- add servlet definitions here -->]]></replacetoken>
95       <replacevalue><![CDATA[<!-- add servlet definitions here -->
96
97   <!-- Servlet definition for portlet use. -->
98   <servlet>
99     <servlet-name>@PORTLET-NAME@</servlet-name>
100     <display-name>@PORTLET-NAME@ Wrapper</display-name>
101     <servlet-class>@PORTLET-SERVLET-CLASS@</servlet-class>
102     <init-param>
103       <param-name>portlet-class</param-name>
104       <param-value>@PORTLET-CLASS@</param-value>
105     </init-param>
106     <init-param>
107       <param-name>portlet-guid</param-name>
108       <param-value>@CONTEXT-ROOT@.@PORTLET-NAME@</param-value>
109     </init-param>
110   </servlet>]]>
111       </replacevalue>
112     </replace>
113
114     <!-- Add the portlet servlet mapping -->
115     <replace file="${app.temp.web.xml}">
116       <replacetoken><![CDATA[<!-- add servlet mappings here -->]]></replacetoken>
117       <replacevalue><![CDATA[<!-- add servlet mappings here -->
118
119   <servlet-mapping>
120     <servlet-name>@PORTLET-NAME@</servlet-name>
121     <url-pattern>/@PORTLET-NAME@/*</url-pattern>
122   </servlet-mapping>]]>
123       </replacevalue>
124     </replace>
125   </target>
126 </project>
Note: See TracBrowser for help on using the browser.