root/trunk/deployment/build.xml

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

This set of updates switches the expected tomcat server to tomcat 5.5.17


For reference the changes needed are noted below. Later today we will have a binary quickstart which can be downloaded from bedework.org whilch will provide what we believe to be a correctly configured tomcat 5.5.17

Changes required to the tomcat instance were...

Copy log4j and the hsqldb drivers from tomcat 5.0.28

cp path-to/jakarta-tomcat-5.0.28/common/classes/log4j.xml path-to/apache-tomcat-5.5.17/common/classes/log4j.xml

cp path-to/jakarta-tomcat-5.0.28/common/lib/hsqldb-1.7.3.3.jar path-to/apache-tomcat-5.5.17/common/lib/hsqldb-1.7.3.3.jar

In conf/web.xml change

<param-name>listings</param-name>
<param-value>false</param-value>

to

<param-name>listings</param-name>
<param-value>true</param-value>

to enable directory browsing.


Other changes...

More schedule changes

Fixed initbedework.xml so it works again.

Move freebusyAggregator config class into calfacade.configs

Suppress inclusion of web.xml from source to remove warning messages
Change democal.properties value from
org.bedework.app.Events.web.xml=guest/web.xml
to
org.bedework.app.Events.web.xml=war/WEB-INF/publicweb.xml

Similarly for SoEDept which now has
org.bedework.app.SoEDept.web.xml=war/WEB-INF/publicweb.xml

and added to public and user caldav which have
org.bedework.app.Pubcaldav.web.xml=war/WEB-INF/publicweb.xml
org.bedework.app.Usercaldav.web.xml=war/WEB-INF/userweb.xml

New global property

org.bedework.global.deploy.on.tomcat=true

This enables copying of context.xml files from the web application source.

Added properties

org.bedework.app.Events.tomcat.context.xml=war/META-INF/publiccontext.xml
org.bedework.app.SoEDept.tomcat.context.xml=war/META-INF/publiccontext.xml
org.bedework.app.UserCal?.tomcat.context.xml=war/META-INF/usercontext.xml
org.bedework.app.Pubcaldav.tomcat.context.xml=war/META-INF/publiccontext.xml
org.bedework.app.Usercaldav.tomcat.context.xml=war/META-INF/usercontext.xml

In addition the values of the context.root properties were changed to include a leading "/". This allows specifying a root context simply by omitting the value.

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     <!-- Load default deploy properties -->
37     <property file="${this.build.dir}/deploy.properties"/>
38
39     <!-- ==================== config properties ========================= -->
40     <property name="org.bedework.clone.name" value="${org.bedework.clone.default}" />
41     <property name="org.bedework.config.properties"
42               location="${org.bedework.config.base}/configs/${org.bedework.clone.name}.properties" />
43     <property name="org.bedework.config.options"
44               location="${org.bedework.config.base}/configs/${org.bedework.clone.name}.options.xml" />
45
46     <echo message="==========================================================" />
47     <echo message="Use config properties ${org.bedework.config.properties}" />
48     <loadproperties
49           srcFile="${org.bedework.config.properties}" >
50       <filterchain>
51         <expandproperties/>
52       </filterchain>
53     </loadproperties>
54
55     <!-- default to debug off -->
56     <property name="app.debug.val" value="0" />
57
58     <!-- set this for the war builds -->
59     <dirname property="app.root.dir" file="${ant.file}"/>
60
61     <!-- ==================== config properties =========================
62     <property name="org.bedework.config.properties"
63               location="${org.bedework.config.base}/configs/${org.bedework.clone.name}.properties" />
64
65     <echo message="==========================================================" />
66     <echo message="Use clone properties ${org.bedework.config.properties}" />
67     <loadproperties
68           srcFile="${org.bedework.config.properties}" >
69       <filterchain>
70         <expandproperties/>
71       </filterchain>
72     </loadproperties>
73     -->
74   </target>
75
76   <target name="deftasks" depends="init">
77     <path id="app.xml.cp">
78       <pathelement location="${org.bedework.deployutil.jar}"/>
79     </path>
80
81     <taskdef name="forEachApp"
82              classname="org.bedework.deployment.ForEachAppTask">
83       <classpath refid="app.xml.cp"/>
84     </taskdef>
85
86     <taskdef name="resolveFile"
87              classname="org.bedework.deployment.ResolveFile">
88       <classpath refid="app.xml.cp"/>
89     </taskdef>
90   </target>
91
92   <target name="build.configured" depends="deftasks" >
93     <!-- Clean up before we start -->
94     <delete dir="${org.bedework.temp.wars.home}" />
95
96     <antcall target="build.standalone.apps" inheritrefs="true" />
97
98     <antcall target="build.portal.apps" inheritrefs="true" />
99
100     <antcall target="build.j2ee.apps" inheritrefs="true" />
101   </target>
102
103   <!-- =================================================================
104        Targets called by the build.configured target. Each is conditional on a
105        config property and each executes a build file in a subdirectory of
106        this component.
107        ================================================================= -->
108
109   <target name="build.standalone.apps" if="org.bedework.global.build.standalone.app" >
110     <!-- ======================= webconfig - only standalone =================
111     <ant antfile="${org.bedework.deployment.base}/webconfig/webapp/build.xml"
112          inheritrefs="true" target="build.configured" />
113           -->
114
115     <property name="org.bedework.deploy.kind" value="webapp" />
116     <antcall target="build.configured.apps" inheritrefs="true" />
117   </target>
118
119   <target name="build.portal.apps" if="org.bedework.global.portal.platform" >
120     <property name="org.bedework.deploy.kind"
121               value="${org.bedework.global.portal.platform}" />
122     <antcall target="build.configured.apps" inheritrefs="true" />
123   </target>
124
125   <target name="build.j2ee.apps" if="org.bedework.global.j2ee.platform" >
126     <property name="org.bedework.deploy.kind"
127               value="${org.bedework.global.j2ee.platform}" />
128     <antcall target="build.configured.apps" inheritrefs="true" />
129   </target>
130
131   <!-- =================================================================
132                          The deploy target.
133        ================================================================= -->
134
135   <target name="deploy" depends="deftasks" >
136     <!-- Clean up before we start -->
137     <delete dir="${org.bedework.temp.wars.home}" />
138
139     <antcall target="deploy.standalone.apps" inheritrefs="true" />
140
141     <antcall target="deploy.shellscr.apps" inheritrefs="true" />
142
143     <antcall target="deploy.portal.apps" inheritrefs="true" />
144
145     <antcall target="deploy.j2ee.apps" inheritrefs="true" />
146
147     <!-- copy startup website that sends you to the applications -->
148     <delete dir="${webapp.root.dir}/bedework"/>
149     <mkdir dir="${webapp.root.dir}/bedework"/>
150     <copy todir="${webapp.root.dir}/bedework">
151       <fileset dir="${app.root.dir}/resources/bedework"/>
152     </copy>
153
154     <!-- copy libs that the application server needs -->
155     <antcall target="deploy.appserver.jdbcdriver" inheritrefs="true" />
156     <antcall target="deploy.appserver.javatools" inheritrefs="true" />
157   </target>
158
159   <!-- =================================================================
160        Targets called by the deploy target. Each is conditional on a
161        config property and each executes a build file in a subdirectory of
162        this component.
163        ================================================================= -->
164
165   <target name="deploy.standalone.apps" if="org.bedework.global.build.standalone.app" >
166     <property name="org.bedework.deploy.kind" value="webapp" />
167     <antcall target="deploy.apps" inheritrefs="true" />
168   </target>
169
170   <target name="deploy.portal.apps" if="org.bedework.global.portal.platform" >
171     <property name="org.bedework.deploy.kind"
172               value="${org.bedework.global.portal.platform}" />
173     <antcall target="deploy.apps" inheritrefs="true" />
174   </target>
175
176   <target name="deploy.j2ee.apps" if="org.bedework.global.j2ee.platform" >
177     <property name="org.bedework.deploy.kind"
178               value="${org.bedework.global.j2ee.platform}" />
179     <antcall target="deploy.apps" inheritrefs="true" />
180   </target>
181
182   <!-- Always build the shellscr stuff. -->
183   <target name="deploy.shellscr.apps" >
184     <property name="org.bedework.deploy.kind" value="shellscr" />
185     <antcall target="deploy.apps" inheritrefs="true" />
186   </target>
187
188   <!-- The cp.xalan task conditionally copies the xalan.jar file, if
189        necessary -->
190   <target name="cp.xalan" if="xalan.in.tomcat.common.endorsed">
191     <copy file="${org.bedework.default.lib}/xalan.jar"
192           todir="${appserver.endorsed.dir}"/>
193   </target>
194
195   <target name="deploy.appserver.jdbcdriver"
196           if="appserver.jdbcdriver.jar" >
197     <!-- copy jdbc jar so datasources work -->
198     <copy todir="${appserver.lib.dir}" file="${appserver.jdbcdriver.jar}"/>
199   </target>
200
201   <target name="deploy.appserver.javatools"
202           if="java.tools.jar" >
203     <!-- copy tools jar so jsps work -->
204     <copy todir="${appserver.lib.dir}" file="${java.tools.jar}"/>
205   </target>
206
207   <!-- =================================================================
208        Targets called by the build.configured target. Each is conditional on a
209        config property and each executes a build file in a subdirectory of
210        this component.
211        ================================================================= -->
212   <target name="build.configured.apps">
213     <forEachApp names="${org.bedework.install.app.names}"
214                 prefix="org.bedework.deploy"
215                 appPrefix="org.bedework.app"
216                 projectPrefix="org.bedework.project">
217       <sequential>
218         <available file="${org.bedework.deploy.type.dir}/${org.bedework.deploy.kind}/build.xml"
219                    property="app.kind.available" />
220         <antcall target="build.available.configured.app" inheritrefs="true" />
221       </sequential>
222     </forEachApp>
223
224     <!-- ======================= termination tasks ================= -->
225     <!--
226     <property name="org.bedework.deploy.type.dir"
227               location="${org.bedework.deployment.base}/termination" />
228               -->
229
230     <ant antfile="${org.bedework.deployment.base}/termination/build.xml"
231          inheritrefs="true" target="build.configured" />
232   </target>
233
234   <target name="build.available.configured.app" if="app.kind.available">
235     <!-- Pick out the application build properties based on the prefix "org.bedework.app."
236          and the deployment name -->
237     <propertyset id="build-app-properties">
238       <propertyref prefix="org.bedework.app.${org.bedework.deploy.name}"/>
239       <globmapper from="org.bedework.app.${org.bedework.deploy.name}.*" to="propval.app.*"/>
240     </propertyset>
241   </target>
242
243   <target name="deploy.apps">
244     <forEachApp names="${org.bedework.install.app.names}"
245                 prefix="org.bedework.deploy"
246                 appPrefix="org.bedework.app"
247                 projectPrefix="org.bedework.project">
248       <sequential>
249         <antcall target="wrap.deploy.available.app" inheritrefs="true" />
250       </sequential>
251     </forEachApp>
252
253     <!-- ======================= termination tasks ================= -->
254     <!--
255     <property name="org.bedework.deploy.type.dir"
256               location="${org.bedework.deployment.base}/termination" />
257               -->
258
259     <ant antfile="${org.bedework.deployment.base}/termination/${org.bedework.deploy.kind}/build.xml"
260          inheritrefs="true" target="deploy" />
261   </target>
262
263   <target name="wrap.deploy.available.app">
264     <available file="${org.bedework.deploy.type.dir}/${org.bedework.deploy.kind}/build.xml"
265                property="app.kind.available" />
266
267     <antcall target="deploy.available.app" inheritrefs="true" />
268   </target>
269
270   <target name="deploy.available.app" if="app.kind.available">
271     <propertyset id="deploy-app-properties">
272       <propertyref prefix="org.bedework.app.${org.bedework.deploy.name}"/>
273       <globmapper from="org.bedework.app.${org.bedework.deploy.name}.*" to="propval.app.*"/>
274     </propertyset>
275
276     <ant antfile="${org.bedework.deploy.type.dir}/${org.bedework.deploy.kind}/build.xml"
277          inheritrefs="true" target="deploy" >
278       <propertyset refid="deploy-app-properties" />
279     </ant>
280   </target>
281 </project>
282
Note: See TracBrowser for help on using the browser.