root/trunk/calendar3/deployment/build.xml

Revision 614 (checked in by douglm, 7 years ago)

Yet more changes for portlet and calendar suites.

These changes add the personal client to the partially portletised set of applications.

In addition changes have been made to how xslt is located.

Starting with the appRoot - if running under a portal the approot has "." + portalPlatform appended

For example we might have an approot of

http://www.mysite.edu/xslthome/cal

If it's running uder uportal the root becomes

http://www.mysite.edu/xslthome/cal.uPortal2

In addition, we append the calendar suite name for public clients.
So if the calendar suite is MainCampus? we have

http://www.mysite.edu/xslthome/cal.MainCampus

or for the portlet
http://www.mysite.edu/xslthome/cal.uPortal2.MainCampus

Line 
1 <?xml version="1.0"?>
2
3 <!-- ===================== Deployment build file =======================
4      This directory and the files within it are to be part of the config
5      and deployment process.
6
7      A number of properties of the form org.bedework.install.XXX will be
8      defined, each indicating that a particualr component is to be deployed.
9
10      Targets below will be executed only if that property is defined.
11
12      Adding a new configuration, e.g. a different portal platform, requires
13      the steps:
14         Create a subdirectory in each components subdirectory,
15         e.g.  webadmin/myportal
16
17         Create any other required resource directories and resources and
18         create a build.xml file to configure and package the component(s).
19
20         Update the config program to load, save and display the new
21         properties for that configuration.
22
23         Add an antcall for each component and a corresponding target
24
25      Authors: Mike Douglass   douglm@rpi.edu
26      =================================================================== -->
27
28 <project name="deploy.bedework" default="init">
29   <property name="base.name" value="deployment"/>
30
31   <target name="init" >
32     <dirname property="this.build.dir" file="${ant.file}"/>
33
34     <property name="source.home" location="${this.build.dir}/src"/>
35
36     <!-- default to debug off -->
37     <property name="app.debug.val" value="0" />
38
39     <!-- set this for the war builds -->
40     <dirname property="app.root.dir" file="${ant.file}"/>
41
42     <!-- ==================== config properties =========================
43     <property name="org.bedework.config.properties"
44               location="${org.bedework.config.base}/configs/${org.bedework.clone.name}.properties" />
45
46     <echo message="==========================================================" />
47     <echo message="Use clone properties ${org.bedework.config.properties}" />
48     <loadproperties
49           srcFile="${org.bedework.config.properties}" >
50       <filterchain>
51         <expandproperties/>
52       </filterchain>
53     </loadproperties>
54     -->
55   </target>
56
57   <target name="build" depends="init"
58           description="Compile deployment Java sources">
59     <!-- ==================== Sources and classes ====================== -->
60
61     <fileset id="base.java.sources" dir="${source.home}" >
62      <include name="org/bedework/deployment/*.java"/>
63       <include name="org/bedework/deployment/*.java"/>
64     </fileset>
65
66     <patternset id="base.class.patternset">
67       <include name="org/bedework/deployment/*.class"/>
68       <include name="org/bedework/deployment/*.class"/>
69     </patternset>
70
71     <!-- ==================== Compilation Classpath ==================== -->
72
73     <path id="compile.classpath">
74       <pathelement location="${ant.jar}"/>
75     </path>
76
77     <!-- ==================== Build Target ============================= -->
78
79     <property name="build.jar.file" location="${org.bedework.deployment.jar}" />
80
81     <ant antfile="${buildjar}" inheritRefs="true" target="build" />
82   </target>
83
84   <target name="deftasks" >
85     <path id="app.xml.cp">
86       <pathelement location="${org.bedework.deployment.jar}"/>
87     </path>
88
89     <taskdef name="forEachApp"
90              classname="org.bedework.deployment.ForEachAppTask">
91       <classpath refid="app.xml.cp"/>
92     </taskdef>
93   </target>
94
95   <target name="build.configured" depends="build,deftasks" >
96     <!-- Clean up before we start -->
97     <delete dir="${org.bedework.temp.wars.home}" />
98
99     <antcall target="build.standalone.apps" inheritrefs="true" />
100
101     <antcall target="build.portal.apps" inheritrefs="true" />
102
103     <antcall target="build.j2ee.apps" inheritrefs="true" />
104
105     <!-- dump restore - always built (until we have a choice of windows/unix. -->
106     <ant antfile="${org.bedework.deployment.base}/dumprestore/shellscr/build.xml"
107          inheritrefs="true" target="build.configured" />
108   </target>
109
110   <!-- =================================================================
111        Targets called by the build.configured target. Each is conditional on a
112        config property and each executes a build file in a subdirectory of
113        this component.
114        ================================================================= -->
115
116   <target name="build.standalone.apps" if="org.bedework.global.build.standalone.app" >
117     <!-- ======================= webconfig - only standalone ================= -->
118     <ant antfile="${org.bedework.deployment.base}/webconfig/webapp/build.xml"
119          inheritrefs="true" target="build.configured" />
120
121     <property name="org.bedework.deploy.kind" value="webapp" />
122     <antcall target="build.configured.apps" inheritrefs="true" />
123   </target>
124
125   <target name="build.portal.apps" if="org.bedework.global.portal.platform" >
126     <property name="org.bedework.deploy.kind"
127               value="${org.bedework.global.portal.platform}" />
128     <antcall target="build.configured.apps" inheritrefs="true" />
129   </target>
130
131   <target name="build.j2ee.apps" if="org.bedework.global.j2ee.platform" >
132     <property name="org.bedework.deploy.kind"
133               value="${org.bedework.global.j2ee.platform}" />
134     <antcall target="build.configured.apps" inheritrefs="true" />
135   </target>
136
137   <!-- =================================================================
138                          The deploy target.
139        ================================================================= -->
140
141   <target name="deploy" depends="build,deftasks" >
142     <!-- Clean up before we start -->
143     <delete dir="${org.bedework.temp.wars.home}" />
144
145     <antcall target="deploy.standalone.apps" inheritrefs="true" />
146
147     <antcall target="deploy.shellscr.apps" inheritrefs="true" />
148
149     <antcall target="deploy.portal.apps" inheritrefs="true" />
150
151     <antcall target="deploy.j2ee.apps" inheritrefs="true" />
152
153     <!-- copy startup website that sends you to the applications -->
154     <delete dir="${webapp.root.dir}/bedework"/>
155     <mkdir dir="${webapp.root.dir}/bedework"/>
156     <copy todir="${webapp.root.dir}/bedework">
157       <fileset dir="${app.root.dir}/resources/bedework"/>
158     </copy>
159
160     <!-- copy libs that the application server needs -->
161     <antcall target="deploy.appserver.jdbcdriver" inheritrefs="true" />
162     <antcall target="deploy.appserver.javatools" inheritrefs="true" />
163   </target>
164
165   <!-- =================================================================
166        Targets called by the deploy target. Each is conditional on a
167        config property and each executes a build file in a subdirectory of
168        this component.
169        ================================================================= -->
170
171   <target name="deploy.standalone.apps" if="org.bedework.global.build.standalone.app" >
172     <property name="org.bedework.deploy.kind" value="webapp" />
173     <antcall target="deploy.apps" inheritrefs="true" />
174   </target>
175
176   <target name="deploy.portal.apps" if="org.bedework.global.portal.platform" >
177     <property name="org.bedework.deploy.kind"
178               value="${org.bedework.global.portal.platform}" />
179     <antcall target="deploy.apps" inheritrefs="true" />
180   </target>
181
182   <target name="deploy.j2ee.apps" if="org.bedework.global.j2ee.platform" >
183     <property name="org.bedework.deploy.kind"
184               value="${org.bedework.global.j2ee.platform}" />
185     <antcall target="deploy.apps" inheritrefs="true" />
186   </target>
187
188   <!-- Always build the shellscr stuff. -->
189   <target name="deploy.shellscr.apps" >
190     <property name="org.bedework.deploy.kind" value="shellscr" />
191     <antcall target="deploy.apps" inheritrefs="true" />
192   </target>
193
194   <!-- The cp.xalan task conditionally copies the xalan.jar file, if
195        necessary -->
196   <target name="cp.xalan" if="xalan.in.tomcat.common.endorsed">
197     <copy file="${org.bedework.default.lib}/xalan.jar"
198           todir="${appserver.endorsed.dir}"/>
199   </target>
200
201   <target name="deploy.appserver.jdbcdriver"
202           if="appserver.jdbcdriver.jar" >
203     <!-- copy jdbc jar so datasources work -->
204     <copy todir="${appserver.lib.dir}" file="${appserver.jdbcdriver.jar}"/>
205   </target>
206
207   <target name="deploy.appserver.javatools"
208           if="java.tools.jar" >
209     <!-- copy tools jar so jsps work -->
210     <copy todir="${appserver.lib.dir}" file="${java.tools.jar}"/>
211   </target>
212
213   <!-- =================================================================
214        Targets called by the build.configured target. Each is conditional on a
215        config property and each executes a build file in a subdirectory of
216        this component.
217        ================================================================= -->
218   <target name="build.configured.apps">
219     <forEachApp names="${org.bedework.install.app.names}"
220                 types="${org.bedework.install.app.types}"
221                 prefix="org.bedework.deploy">
222       <sequential>
223         <available file="${org.bedework.deployment.base}/${org.bedework.deploy.type}/${org.bedework.deploy.kind}/build.xml"
224                    property="app.kind.available" />
225         <antcall target="build.available.configured.app" inheritrefs="true" />
226       </sequential>
227     </forEachApp>
228
229     <!-- ======================= termination tasks ================= -->
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"
234          inheritrefs="true" target="build.configured" />
235   </target>
236
237   <target name="build.available.configured.app" if="app.kind.available">
238     <!-- Pick out the application build properties based on the prefix "org.bedework.app."
239          and the deployment name -->
240     <propertyset id="build-app-properties">
241       <propertyref prefix="org.bedework.app.${org.bedework.deploy.name}"/>
242       <globmapper from="org.bedework.app.${org.bedework.deploy.name}.*" to="propval.app.*"/>
243     </propertyset>
244
245     <!--
246     <property name="${propval.app.portal.platform}" value="" />
247
248     <condition property="org.bedework.build.for.jetspeed2">
249       <equals arg1="jetspeed2" arg2="${propval.app.portal.platform}"/>
250     </condition>
251
252     <condition property="org.bedework.build.for.uportal2">
253       <equals arg1="uportal2" arg2="${propval.app.portal.platform}"/>
254     </condition>
255
256     <condition property="org.bedework.build.for.jboss">
257       <equals arg1="jboss" arg2="${org.bedework.global.j2ee.platform}"/>
258     </condition>
259     -->
260
261     <property name="org.bedework.deploy.type.dir"
262               location="${org.bedework.deployment.base}/termination" />
263
264     <ant antfile="${org.bedework.deploy.type.dir}/${org.bedework.deploy.kind}/build.xml"
265          inheritrefs="true" target="build.configured" >
266       <propertyset refid="build-app-properties" />
267     </ant>
268   </target>
269
270   <target name="deploy.apps">
271     <forEachApp names="${org.bedework.install.app.names}"
272                 types="${org.bedework.install.app.types}"
273                 prefix="org.bedework.deploy">
274       <sequential>
275         <antcall target="wrap.deploy.available.app" inheritrefs="true" />
276       </sequential>
277     </forEachApp>
278
279     <!-- ======================= termination tasks ================= -->
280     <property name="org.bedework.deploy.type.dir"
281               location="${org.bedework.deployment.base}/termination" />
282
283     <ant antfile="${org.bedework.deploy.type.dir}/${org.bedework.deploy.kind}/build.xml"
284          inheritrefs="true" target="deploy" />
285   </target>
286
287   <target name="wrap.deploy.available.app">
288     <!-- just to make app.kind.available go away -->
289     <property name="org.bedework.deploy.type.dir"
290               location="${org.bedework.deployment.base}/${org.bedework.deploy.type}" />
291
292     <available file="${org.bedework.deploy.type.dir}/${org.bedework.deploy.kind}/build.xml"
293                property="app.kind.available" />
294
295     <antcall target="deploy.available.app" inheritrefs="true" />
296   </target>
297
298   <target name="deploy.available.app" if="app.kind.available">
299     <propertyset id="deploy-app-properties">
300       <propertyref prefix="org.bedework.app.${org.bedework.deploy.name}"/>
301       <globmapper from="org.bedework.app.${org.bedework.deploy.name}.*" to="propval.app.*"/>
302     </propertyset>
303
304     <echo message="XXXXXXXXXXXX      type=${org.bedework.deploy.type}" />
305     <echo message="XXXXXXXXXXXX      name=${org.bedework.deploy.name}" />
306
307     <!--
308     <property name="${propval.app.portal.platform}" value="" />
309
310     <condition property="org.bedework.build.for.jetspeed2">
311       <equals arg1="jetspeed2" arg2="${propval.app.portal.platform}"/>
312     </condition>
313
314     <condition property="org.bedework.build.for.uportal2">
315       <equals arg1="uportal2" arg2="${propval.app.portal.platform}"/>
316     </condition>
317
318     <condition property="org.bedework.build.for.jboss">
319       <equals arg1="jboss" arg2="${org.bedework.global.j2ee.platform}"/>
320     </condition>
321     -->
322
323     <property name="org.bedework.deploy.type.dir"
324               location="${org.bedework.deployment.base}/${org.bedework.deploy.type}" />
325
326     <ant antfile="${org.bedework.deploy.type.dir}/${org.bedework.deploy.kind}/build.xml"
327          inheritrefs="true" target="deploy" >
328       <propertyset refid="deploy-app-properties" />
329     </ant>
330   </target>
331 </project>
Note: See TracBrowser for help on using the browser.