root/trunk/deployment/webpublic/webapp/build.xml

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

Try to do the same for platforms (jboss, tomcat etc) as I just did for portals.

The deployment directories are much simplified and the build process seems a bit clearer.

Line 
1 <?xml version="1.0"?>
2
3 <!-- ===================================================================
4      Default public events web application deployer
5      =================================================================== -->
6
7 <project name="bwpublic.deploy" default="deploy" >
8   <import file="${org.bedework.deployment.base}/deployprops.xml" />
9
10   <dirname property="this.dir" file="${ant.file}"/>
11
12   <import file="${this.dir}/appjars.xml" />
13
14   <target name="init" >
15     <getExtraJars />
16
17     <property name="app.war.file"
18               location="${dist.home}/${propval.app.war.name}.war" />
19
20     <property name="app.sou.dir" location="${org.bedework.deploy.app.sou}" />
21
22     <property name="org.bedework.use.dojo" value="true" />
23
24     <!-- Flag as struts -->
25     <property name="org.bedework.strutsapp" value="true" />
26
27     <!-- Properties that differ from the personal client -->
28     <!--
29     <property name="app.web.xml"
30               value="${app.sou.dir}/war/WEB-INF/web.xml" />
31               -->
32
33     <property name="app.resources.dir"
34               location="${this.dir}/resources" />
35   </target>
36
37   <!-- =================================================================
38        The "deploy" target first builds a configured component then copies
39        all required files to the appropriate servlet container directories.
40
41        Currently this only works for the quickstart distribution.
42        For example, it does not handle deploying into jboss and copying
43        resource files (images, stylesheets) to external locations.
44        ================================================================= -->
45
46   <target name="deploy" depends="init,build.configured" >
47     <!-- First copy the resources into the server -->
48
49     <if>
50       <not>
51         <isset property="org.bedework.global.noskins" />
52       </not>
53       <then>
54         <delete dir="${org.bedework.appserver.dir}/${propval.app.resources.dir}.${propval.app.cal.suite}" />
55         <copy todir="${org.bedework.appserver.dir}/${propval.app.resources.dir}.${propval.app.cal.suite}">
56           <fileset dir="${app.resources.dir}/demoskins/${propval.app.cal.suite}" />
57         </copy>
58
59         <if>
60           <isset property="org.bedework.global.portal.platform" />
61           <then>
62             <!-- The intent is to have a set of quickstart skins configured for
63                  portal use. So far we've not managed that so for the time being we
64                  will just use the standalone skin set. -->
65             <property name="dest.skins.dir"
66                       location="${org.bedework.appserver.dir}/${propval.app.resources.dir}.${org.bedework.global.portal.platform}.${propval.app.cal.suite}" />
67             <delete dir="${dest.skins.dir}" />
68             <copy todir="${dest.skins.dir}">
69               <fileset dir="${app.resources.dir}/demoskins/${propval.app.cal.suite}" />
70             </copy>
71           </then>
72         </if>
73       </then>
74     </if>
75
76     <if>
77       <not>
78         <isset property="org.bedework.global.build.ear" />
79       </not>
80       <then>
81         <echo message="***************************************************************" />
82         <echo message="Deploying standalone app ${app.war.file} into ${org.bedework.appserver.dir}/${propval.app.deploy.dir}" />
83         <echo message="***************************************************************" />
84
85         <!-- Delete expanded version -->
86         <delete dir="${org.bedework.appserver.dir}/${propval.app.deploy.dir}/${propval.app.war.name}" />
87
88         <!-- copy the war file. -->
89         <copy todir="${org.bedework.appserver.dir}/${propval.app.deploy.dir}"
90               file="${app.war.file}"
91               overwrite="yes" />
92
93         <!-- Delete the quickstart context def -->
94         <delete file="${org.bedework.appserver.dir}/conf/Catalina/localhost/${propval.app.war.name}.xml" />
95       </then>
96     </if>
97   </target>
98
99   <target name="build.configured" depends="init" >
100     <!-- ===============================================================
101          Build the war
102          =============================================================== -->
103
104     <ant antfile="${buildwar}" inheritRefs="true" target="build" />
105   </target>
106 </project>
107
Note: See TracBrowser for help on using the browser.