root/trunk/deployment/webconfig/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      Web config application deployer
5      =================================================================== -->
6
7 <project name="bwconfig.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     <!--
28     <property name="app.web.xml"
29               value="${app.sou.dir}/war/WEB-INF/web.xml" />
30               -->
31
32     <property name="app.resources.dir"
33               location="${this.dir}/resources" />
34   </target>
35
36   <!-- =================================================================
37        The "deploy" target first builds a configured component then copies
38        all required files to the appropriate servlet container directories.
39
40        Currently this only works for the quickstart distribution.
41        For example, it does not handle deploying into jboss and copying
42        resource files (images, stylesheets) to external locations.
43        ================================================================= -->
44
45   <target name="deploy" depends="init,build.configured" >
46     <if>
47       <not>
48         <isset property="org.bedework.global.noskins" />
49       </not>
50       <then>
51         <delete dir="${org.bedework.appserver.dir}/${propval.app.resources.dir}" />
52         <copy todir="${org.bedework.appserver.dir}/${propval.app.resources.dir}">
53           <fileset dir="${app.resources.dir}" />
54         </copy>
55       </then>
56     </if>
57
58     <if>
59       <not>
60         <isset property="org.bedework.global.build.ear" />
61       </not>
62       <then>
63         <echo message="***************************************************************" />
64         <echo message="Deploying standalone app ${app.war.file} into ${org.bedework.appserver.dir}/${propval.app.deploy.dir}" />
65         <echo message="***************************************************************" />
66
67         <!-- copy the war file. -->
68         <copy todir="${org.bedework.appserver.dir}/${propval.app.deploy.dir}" file="${app.war.file}"
69               overwrite="yes" />
70
71         <!-- Delete expanded version -->
72         <delete dir="${org.bedework.appserver.dir}/${propval.app.deploy.dir}/${propval.app.war.name}" />
73
74         <!-- Delete the quickstart context def -->
75         <delete file="${org.bedework.appserver.dir}/conf/Catalina/localhost/${propval.app.war.name}.xml" />
76       </then>
77     </if>
78   </target>
79
80   <target name="build.configured" depends="init" >
81     <!-- ===============================================================
82          Build the war
83          =============================================================== -->
84
85     <ant antfile="${buildwar}" inheritRefs="true" target="build" />
86   </target>
87 </project>
88
Note: See TracBrowser for help on using the browser.