root/trunk/deployment/resources/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.

  • Property svn:eol-style set to LF
Line 
1 <?xml version="1.0"?>
2
3 <!-- ===================================================================
4      Default public events web application deployer
5      =================================================================== -->
6
7 <project name="bwcommonresources.deploy" default="deploy" >
8   <property name="propval.app.context.root"
9             value="${org.bedework.global.build.common.context.root}" />
10   <property name="propval.app.deploy.dir"
11             value="${org.bedework.global.build.common.context.deploy.dir}" />
12   <property name="propval.app.display.name"
13             value="${org.bedework.global.build.common.context.name}" />
14   <property name="propval.app.war.name"
15             value="${org.bedework.global.build.common.context.war.name}" />
16
17   <import file="${build.dir}/buildfilters.xml" />
18
19   <target name="init" >
20     <dirname property="common.resources.dir" file="${ant.file}"/>
21
22     <property name="app.common.resources.dest.dir"
23               location="${org.bedework.deploy.app.sou}" />
24
25     <property name="org.bedework.use.dojo" value="true" />
26
27     <property name="common.war.name"
28               value="${org.bedework.global.build.common.context.war.name}" />
29     <property name="common.dest.war"
30               location="${org.bedework.temp.wars.home}/${common.war.name}.war" />
31
32     <property name="common.war.file"
33               location="${dist.home}/${common.war.name}.war" />
34   </target>
35
36   <!-- =================================================================
37        The "deploy" target is called by applications which need common
38        resources copied into their own directory structure.
39        ================================================================= -->
40
41   <target name="deploy" depends="init" >
42     <!--
43     <if>
44       <isset property="org.bedework.global.build.common.context" />
45       <then>
46        -->
47         <!-- Build a deployable war file with common files -->
48
49         <delete dir="${common.dest.war}" />
50
51         <copy todir="${common.dest.war}" failonerror="false" >
52           <fileset dir="${org.bedework.common.resources}/common-context" />
53           <filterset refid="property.filters" />
54         </copy>
55
56         <if>
57           <isset property="org.bedework.use.dojo" />
58           <then>
59             <!-- Add dojo -->
60             <copy todir="${common.dest.war}/javascript/dojo">
61               <fileset dir="${common.resources.dir}/javascript/${org.bedework.dojo.dir}" />
62             </copy>
63           </then>
64         </if>
65
66         <copy todir="${common.dest.war}">
67           <fileset dir="${common.resources.dir}/xsl" />
68         </copy>
69
70         <copy todir="${common.dest.war}/images">
71           <fileset dir="${common.resources.dir}/images" />
72         </copy>
73
74         <!-- build the war file -->
75         <mkdir dir="${dist.home}" />
76         <delete file="${common.war.file}" />
77
78         <war warfile="${common.war.file}"
79              webxml="${common.dest.war}/WEB-INF/web.xml"
80              basedir="${common.dest.war}"
81              excludes="WEB-INF/web.xml" />
82
83         <if>
84           <not>
85             <isset property="org.bedework.global.build.ear" />
86           </not>
87           <then>
88             <echo message="***************************************************************" />
89             <echo message="Deploying common context ${common.war.file} into ${org.bedework.appserver.dir}/${propval.app.deploy.dir}" />
90             <echo message="***************************************************************" />
91
92             <!-- Delete expanded version -->
93             <delete dir="${org.bedework.appserver.dir}/${propval.app.deploy.dir}/${propval.app.war.name}" />
94
95             <!-- copy the war file. -->
96             <copy todir="${org.bedework.appserver.dir}/${propval.app.deploy.dir}"
97                   file="${common.war.file}"
98                   overwrite="yes" />
99
100             <!-- Delete the quickstart context def -->
101             <delete file="${org.bedework.appserver.dir}/conf/Catalina/localhost/${propval.app.war.name}.xml" />
102           </then>
103         </if>
104 <!--
105       </then>
106       <else>
107         <if>
108           <not>
109             <isset property="org.bedework.global.noskins" />
110           </not>
111           <then>
112             < ! - - Just copy into a common location  - - >
113             <property name="cmn.destdir"
114                       location="${org.bedework.appserver.dir}/${org.bedework.global.common.deploydir}"/>
115             <if>
116               <isset property="org.bedework.use.dojo" />
117               <then>
118                 < ! - - Add dojo - - >
119                 <copy todir="${cmn.destdir}/javascript/dojo">
120                   <fileset dir="${common.resources.dir}/javascript/${org.bedework.dojo.dir}" />
121                 </copy>
122               </then>
123             </if>
124
125             <copy todir="${cmn.destdir}">
126               <fileset dir="${common.resources.dir}/xsl" />
127             </copy>
128
129             <copy todir="${cmn.destdir}/images">
130               <fileset dir="${common.resources.dir}/images" />
131             </copy>
132
133           </then>
134         </if>
135       </else>
136     </if>
137        -->
138   </target>
139 </project>
140
Note: See TracBrowser for help on using the browser.