1
+ <?xml version =" 1.0" ?>
2
+ <!--
3
+ =======================================================================
4
+ A master build file for creating a release of Spring Web Services
5
+ =======================================================================
6
+ -->
7
+ <project name =" build-spring-ws" default =" release" xmlns : ivy =" antlib:fr.jayasoft.ivy.ant" >
8
+
9
+ <!-- Load local and user build preferences -->
10
+ <property file =" build.properties" />
11
+ <property file =" project.properties" />
12
+ <property file =" ${ user.home } /build.properties" />
13
+
14
+ <!-- try to load ivy here from local lib dir, in case the user has not already dropped
15
+ it into ant's lib dir (note that the latter copy will always take precedence).
16
+ We will not fail as long as local lib dir exists (it may be empty) and
17
+ ivy is in at least one of ant's lib dir or the local lib dir. -->
18
+ <path id =" ivy.lib.path" >
19
+ <fileset dir =" ${ common.build.dir } /lib" includes =" *.jar" />
20
+ </path >
21
+
22
+ <taskdef resource =" fr/jayasoft/ivy/ant/antlib.xml" uri =" antlib:fr.jayasoft.ivy.ant" classpathref =" ivy.lib.path" />
23
+
24
+ <!-- simplistic pattern for zipping up sources -->
25
+ <selector id =" project.source.zip.includes" >
26
+ <or >
27
+ <filename name =" common-build/**" />
28
+ <and >
29
+ <or >
30
+ <filename name =" build-spring-ws/**" />
31
+ <filename name =" spring-oxm/**" />
32
+ <filename name =" spring-ws-core/**" />
33
+ <filename name =" spring-ws-samples/**" />
34
+ </or >
35
+ <and >
36
+ <!-- exclude core project derived artifacts -->
37
+ <filename name =" */docs/**" negate =" true" />
38
+ <filename name =" */target/**" negate =" true" />
39
+ <filename name =" */build.properties" negate =" true" />
40
+ <filename name =" */lib/**" negate =" true" />
41
+ </and >
42
+ <and >
43
+ <!-- exclude sample project derived artifacts -->
44
+ <filename name =" */*/docs/**" negate =" true" />
45
+ <filename name =" */*/target/**" negate =" true" />
46
+ <filename name =" */*/build.properties" negate =" true" />
47
+ <filename name =" */*/lib/**" negate =" true" />
48
+ </and >
49
+ </and >
50
+ </or >
51
+ </selector >
52
+
53
+ <!--
54
+ targets: displays all targets suitable for developer use
55
+ -->
56
+ <target name =" targets" >
57
+ <echo >
58
+
59
+ Master build for Spring-WS jars.
60
+
61
+ Please execute
62
+ ant -p
63
+
64
+ to see a list of all relevant targets.
65
+ The default target is 'release'
66
+ </echo >
67
+ </target >
68
+
69
+ <!--
70
+ init: initializes some common settings
71
+ -->
72
+ <target name =" init" unless =" init.done" depends =" init.pre, init.post" >
73
+ </target >
74
+
75
+ <target name =" init.pre" >
76
+ <!-- ivy will determine the right order to build oxm, ws and samples -->
77
+
78
+ <property name =" ivy.conf.dir" value =" ${ common.build.dir } " />
79
+
80
+ <ivy : configure file =" ${ ivy.conf.dir } /ivyconf.xml" />
81
+
82
+ <ivy : buildlist reference =" modules" >
83
+ <fileset dir =" .." >
84
+ <include name =" spring-oxm/build.xml" />
85
+ <include name =" spring-ws-core/build.xml" />
86
+ <include name =" spring-ws-samples/*/build.xml" />
87
+ </fileset >
88
+ </ivy : buildlist >
89
+ <tstamp >
90
+ <format property =" build.timestamp" pattern =" yyyyMMddHHmmss" />
91
+ </tstamp >
92
+ <tstamp >
93
+ <format property =" TSTAMPCOL" pattern =" hh:mm" />
94
+ </tstamp >
95
+
96
+ <!-- default the release version (used in release archive zips) to the current timestamp -->
97
+ <property name =" release.version" value =" ${ build.timestamp } " />
98
+
99
+ <!-- root of build hierarchy -->
100
+ <property name =" target.dir" value =" ${ basedir } /target" />
101
+
102
+ <!-- directory for release zips -->
103
+ <property name =" target.release.dir" value =" ${ target.dir } /release" />
104
+
105
+ <!-- directory for release zips -->
106
+ <property name =" zip.toplevel.dir" value =" spring-ws-${ release.version } " />
107
+ <property name =" release.zip" value =" spring-ws-${ release.version } .zip" />
108
+
109
+ <echo message =' user.dir = "${ user.dir } "' />
110
+ <echo message =' ant.file = "${ ant.file } "' />
111
+ <echo message =' ant.java.version = "${ ant.java.version } "' />
112
+ <echo message =' release.version = "${ release.version } "' />
113
+ </target >
114
+
115
+ <target name =" init.post" >
116
+ <property name =" projects" value =" modules" />
117
+ <property name =" projects.names" refid =" modules" />
118
+ <property name =" init.done" value =" true" />
119
+ </target >
120
+
121
+ <target name =" clean" depends =" init" description =" Cleans all build output files from all projects" >
122
+ <delete dir =" ${ target.dir } " />
123
+ <echo >projects=${ projects } </echo >
124
+ <echo >projects.names=${ projects.names } </echo >
125
+ <subant target =" clean" inheritall =" false" >
126
+ <buildpath refid =" ${ projects } " />
127
+ </subant >
128
+ </target >
129
+
130
+ <target name =" clean-all" depends =" init"
131
+ description =" Cleans all build output files from all projects, and also retrieved libs" >
132
+ <echo >projects=${ projects } </echo >
133
+ <subant target =" clean-all" inheritall =" false" >
134
+ <buildpath refid =" ${ projects } " />
135
+ </subant >
136
+ </target >
137
+
138
+ <target name =" publish" depends =" init"
139
+ description =" Calls publish targets on each project" >
140
+ <echo >projects=${ projects } </echo >
141
+ <subant target =" publish" inheritall =" false" >
142
+ <buildpath refid =" ${ projects } " />
143
+ </subant >
144
+ </target >
145
+
146
+ <target name =" dist" depends =" init"
147
+ description =" Calls dist targets on each project" >
148
+ <echo >projects=${ projects } </echo >
149
+ <subant target =" dist" inheritall =" false" >
150
+ <buildpath refid =" ${ projects } " />
151
+ </subant >
152
+ </target >
153
+
154
+ <target name =" build-release-repo" depends =" init" description =" Builds repo of all dependencies for all projects" >
155
+ <echo >projects=${ projects } </echo >
156
+ <subant target =" retrieve-to-repo" inheritall =" false" >
157
+ <property name =" retrieve.to.repo.dir" value =" ${ target.dir } /repo" />
158
+ <property name =" retrieve.to.repo.pattern"
159
+ value =" ${ release.repo.ivy.retrieve.pattern } " />
160
+ <property name =" retrieve.to.repo.pattern.ivy"
161
+ value =" ${ release.repo.ivy.retrieve.ivy.pattern } " />
162
+ <buildpath refid =" ${ projects } " />
163
+ </subant >
164
+ </target >
165
+
166
+ <target name =" tests" depends =" init" description =" Calls test targets on each project" >
167
+ <echo >projects=${ projects } </echo >
168
+ <subant target =" tests" inheritall =" false" >1
169
+ <buildpath refid =" ${ projects } " />
170
+ </subant >
171
+ </target >
172
+
173
+ <target name =" javadoc" depends =" init" description =" Calls javadoc targets on each project" >
174
+ <echo >projects=${ projects } </echo >
175
+ <subant target =" javadoc" inheritall =" false" >
176
+ <buildpath refid =" ${ projects } " />
177
+ </subant >
178
+ </target >
179
+
180
+ <target name =" doc" depends =" init" description =" Calls doc targets on applicable projects" >
181
+ <echo >projects=${ projects } </echo >
182
+ <subant target =" doc-all" inheritall =" false" failonerror =" false" >
183
+ <buildpathelement location =" ../spring-ws-core" />
184
+ </subant >
185
+ </target >
186
+
187
+ <target name =" release"
188
+ depends =" dist, build-release-repo, javadoc, doc, gen.release.zip"
189
+ description =" Generate the spring-ws release archive" >
190
+ </target >
191
+
192
+ <target name =" gen.release.zip" depends =" init" >
193
+ <mkdir dir =" ${ target.release.dir } " />
194
+ <delete file =" ${ target.release.dir } /${ release.zip } " />
195
+
196
+ <zip zipfile =" ${ target.release.dir } /${ release.zip } " >
197
+ <!-- important readme, license, and other text files -->
198
+ <zipfileset file =" ../spring-ws-core/*.txt" prefix =" ${ zip.toplevel.dir } " />
199
+ <!-- binary files -->
200
+ <zipfileset dir =" ../spring-ws-core/target/dist/jars" prefix =" ${ zip.toplevel.dir } " />
201
+ <zipfileset dir =" ../spring-oxm/target/dist/jars" prefix =" ${ zip.toplevel.dir } " />
202
+ <zipfileset dir =" ../spring-ws-core/target/javadocs" prefix =" ${ zip.toplevel.dir } /docs/api" />
203
+ <zipfileset dir =" ../spring-ws-core/docs/reference/target" prefix =" ${ zip.toplevel.dir } /docs/reference" >
204
+ <exclude name =" **/html_single/**" />
205
+ </zipfileset >
206
+ <zipfileset dir =" ${ target.dir } /repo"
207
+ prefix =" ${ zip.toplevel.dir } /projects/repository" />
208
+ <!-- project sources -->
209
+ <zipfileset dir =" .." prefix =" ${ zip.toplevel.dir } /projects" >
210
+ <selector refid =" project.source.zip.includes" />
211
+ </zipfileset >
212
+ </zip >
213
+ </target >
214
+
215
+ </project >
0 commit comments