root/trunk/calendar3/bldfiles/buildear.xml

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

Fixes needed to resolve properties issues when applications are bundled together.

The result of bundling the applications is that the properties files are all on the same class path. This means that we cannot have one resource file per application, rather it's shared between all of them.

Rather than have client specific properties be based on a particular properties file they are now based on the context paramater bwappname. This is used to create a property name prefix which is then used to get client specific properties.

There is an additional section in the config/configs/democal.properties file which defiens the names and associated type of application.

Most application properties have changed and a few have been added. Watch out for the additonal properties

# uris to cross link apps - of dubious usefulness
org.bedework.global.public.admin.uri=/caladmin
org.bedework.global.public.calendar.uri=/cal
org.bedework.global.personal.calendar.uri=/ucal

Additional properties have also been added to each application section - <app-prefix> refers to the application specific part of the name, e.g. org.bedework.app.Caladmin

<app-prefix>.logprefix= value used for log messages
<app-prefix>.guestmode= true for config, public events client and public caldav, false elsewhere
<app-prefix>.publicadmin= true for public events admin client, false elsewhere
<app-prefix>.run.as.user= only present for pubcaldav(?), public events admin and public events client.

Created a new ant task to cycle through the above list of applications. Also made use of the ant propertyset task.

Line 
1 <!--
2      This is the build.xml for bedework which is called by the main build
3      file to create a ear file.
4
5      Properties which must be defined on entry, apart from those described
6      in the main build file are:
7        app.name          Directory we build in, name of war and ear files.
8        app.context.name  Context root for the app
9        app.war           Name of the war file
10 -->
11
12 <project name="uwcal.buildear" default="build" basedir=".">
13
14   <target name="build"
15           description="Build ear file">
16     <property name="app.dest.home"
17               location="${org.bedework.temp.ears.home}/${propval.app.ear.name}" />
18     <property name="app.dest.ear"
19               location="${app.dest.home}/ear" />
20     <property name="app.dest.earinf"
21               location="${app.dest.ear}/META-INF" />
22
23     <property name="app.ear.file"
24               location="${dist.home}/${propval.app.ear.name}.ear" />
25
26     <copy tofile="${app.dest.earinf}/application.xml"
27           file="${application.xml}"
28           overwrite="yes" >
29       <filterset>
30         <filter token="DISPLAY-NAME" value="${propval.app.name}"/>
31         <filter token="WAR-NAME" value="${propval.app.war.name}"/>
32         <filter token="CONTEXT-ROOT" value="${propval.app.context.root}"/>
33       </filterset>
34     </copy>
35
36     <jar jarfile="${app.ear.file}">
37       <fileset dir="${app.dest.ear}" >
38         <include name="META-INF/*.xml" />
39       </fileset>
40       <fileset dir="${dist.home}">
41         <include name="${propval.app.war.name}.war" />
42       </fileset>
43     </jar>
44
45   </target>
46 </project>
Note: See TracBrowser for help on using the browser.