root/trunk/deployment/resources/build.xml

Revision 3460 (checked in by douglm, 1 year ago)

Almost completely build changes - mostly elimination of the per-project build.properties file.

There is now a single properties file in the config which determines all the project versions - with the exception of deployutil.

This update also includes a new deployment task to collect jar references and license information. A small utility will generate a readable notice and references file for the quickstart and/or the site.

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