root/trunk/calendar3/deployment/webuser/webapp/build.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 <?xml version="1.0"?>
2
3 <!-- ===================================================================
4      Default personal events web application deployer
5      =================================================================== -->
6
7 <project name="bwpersonal.deploy" default="deploy" >
8   <target name="init" >
9     <!-- and define some properties based on those -->
10     <property name="app.war.file"
11               location="${dist.home}/${propval.app.war.name}.war" />
12
13     <dirname property="this.dir" file="${ant.file}"/>
14
15     <property name="app.sou.dir" location="${org.bedework.webclient.base}" />
16
17     <!-- Flag as struts -->
18     <property name="org.bedework.strutsapp" value="true" />
19
20     <!-- Properties that differ from the public client -->
21     <property name="app.web.xml"
22               value="${app.sou.dir}/war/WEB-INF/userweb.xml" />
23
24     <!-- This should be in the config stuff -->
25     <property name="propval.directory.browsing.disallowed"
26               value="${app.directory.browsing.disallowed}" />
27
28     <property name="propval.app.guestmode" value="false" />
29
30     <property name="app.resources.dir"
31               location="${this.dir}/resources" />
32   </target>
33
34   <!-- =================================================================
35        The "deploy" target first builds a configured component then copies
36        all required files to the appropriate servlet container directories.
37
38        Currently this only works for the quickstart distribution.
39        For example, it does not handle deploying into jboss and copying
40        resource files (images, stylesheets) to external locations.
41        ================================================================= -->
42
43   <target name="deploy" depends="init,build.configured" >
44     <!-- First copy the resources into the server -->
45     <echo message="###################${app.resources.dir}/${propval.app.skinset.name}" />
46     <delete dir="${org.bedework.appserver.dir}/${propval.app.resources.dir}" />
47     <copy todir="${org.bedework.appserver.dir}/${propval.app.resources.dir}">
48       <fileset dir="${app.resources.dir}/${propval.app.skinset.name}" />
49     </copy>
50
51     <echo message="***************************************************************" />
52     <echo message="Deploying standalone app ${app.war.file} into ${org.bedework.appserver.dir}/${propval.app.deploy.dir}" />
53     <echo message="***************************************************************" />
54
55     <!-- copy the war file. -->
56     <copy todir="${org.bedework.appserver.dir}/${propval.app.deploy.dir}" file="${app.war.file}"
57           overwrite="yes" />
58
59     <!-- Delete expanded version -->
60     <delete dir="${org.bedework.appserver.dir}/${propval.app.deploy.dir}/${propval.app.context.root}" />
61   </target>
62
63   <target name="build.configured" depends="init" >
64     <!-- ===============================================================
65          Libraries for this application
66          =============================================================== -->
67
68     <!-- from  the lib directory -->
69     <fileset id="app.lib.files" dir="${org.bedework.empty.dir}" >
70     </fileset>
71
72     <!-- from  the temp jars directory -->
73     <fileset id="app.temp.lib.files" dir="${org.bedework.temp.jars}" >
74       <include name="${org.bedework.webclient.jar.name}" />
75     </fileset>
76
77     <!-- ===============================================================
78          Build the war
79          =============================================================== -->
80
81     <ant antfile="${buildwar}" inheritRefs="true" target="build" />
82   </target>
83 </project>
84
Note: See TracBrowser for help on using the browser.