root / trunk / applications / appgvSIG / build.xml @ 22996
History | View | Annotate | Download (17.3 KB)
1 | 7210 | cesar | <project name="appgvSIG" default="dist" basedir="."> |
---|---|---|---|
2 | 312 | fernando | <description>
|
3 | 13296 | jmvivo | gvSIG Main build |
4 | 312 | fernando | </description>
|
5 | 13296 | jmvivo | |
6 | <import file="../binaries/ant/utilities.xml"/> |
||
7 | |||
8 | <!--
|
||
9 | ============================================
|
||
10 | 13423 | cesar | Properties for build of the appgvSIG project
|
11 | 13296 | jmvivo | ============================================
|
12 | -->
|
||
13 | <property name="version" value="1.2 ${eclipse.startTime}"/> |
||
14 | 4907 | cesar | <property name="src" location="src"/> |
15 | <property name="build" location="bin"/> |
||
16 | 13423 | cesar | <property name="src-test" location="src-test"/> |
17 | <property name="build-test" location="bin-test"/> |
||
18 | 4907 | cesar | <property name="dist" location="dist"/> |
19 | <property name="lib" location="lib"/> |
||
20 | <property name="plugin" value="com.iver.cit.gvsig"/> |
||
21 | <property name="fmapdir" value="../libFMap"/> |
||
22 | <property name="extensionDir" location="../_fwAndami/gvSIG/extensiones"/> |
||
23 | <property name="andamiLibs" location="../_fwAndami/lib"/> |
||
24 | <property name="fmapLibs" location="../libFMap/lib"/> |
||
25 | <property name="andamiJar" location="../_fwAndami/andami.jar"/> |
||
26 | 13126 | jmvivo | |
27 | 13296 | jmvivo | <!--
|
28 | ============================================
|
||
29 | Properties for global build
|
||
30 | ============================================
|
||
31 | -->
|
||
32 | 13126 | jmvivo | |
33 | 13533 | mhaloui | <property name="gvSIG_projects" value=" |
34 | 17220 | jmvivo | libExceptions,
|
35 | 13638 | jmvivo | libInternationalization,
|
36 | libIverUtiles,
|
||
37 | libUIComponent,
|
||
38 | _fwAndami,
|
||
39 | libCorePlugin,
|
||
40 | libProjection,
|
||
41 | libRaster,
|
||
42 | libDXF,
|
||
43 | libDriverManager,
|
||
44 | libRemoteServices,
|
||
45 | libGDBMS,
|
||
46 | libFMap,
|
||
47 | appgvSIG,
|
||
48 | libJCRS,
|
||
49 | extJCRS,
|
||
50 | 21350 | jmvivo | libTopology,
|
51 | 13638 | jmvivo | libDwg,
|
52 | extDwg,
|
||
53 | 16268 | jmvivo | libCacheService,
|
54 | 19315 | jmvivo | extSymbology,
|
55 | 13638 | jmvivo | extRasterTools-SE,
|
56 | extAddEventTheme,
|
||
57 | appCatalogAndGazetteerClient,
|
||
58 | extCatalogAndGazetteer,
|
||
59 | extDataLocator,
|
||
60 | extJDBC,
|
||
61 | extCAD,
|
||
62 | extGeoProcessing,
|
||
63 | extGeoprocessingExtensions,
|
||
64 | extGeoreferencing,
|
||
65 | 21350 | jmvivo | extTopology,
|
66 | 13638 | jmvivo | extOracleSpatial,
|
67 | extSDE,
|
||
68 | extScripting,
|
||
69 | extAnnotations,
|
||
70 | extExpressionField,
|
||
71 | extWCS,
|
||
72 | extWFS2,
|
||
73 | extWMS,
|
||
74 | extCenterViewToPoint,
|
||
75 | libArcIMS,
|
||
76 | extArcims,
|
||
77 | extRemoteSensing,
|
||
78 | 15630 | jmvivo | extGraph,
|
79 | 15946 | jmvivo | extHelp,
|
80 | extIconThemeBase,
|
||
81 | 16348 | jmvivo | lib3DMap,
|
82 | 16268 | jmvivo | ext3Dgui,
|
83 | 13638 | jmvivo | binaries
|
84 | "/> |
||
85 | 13296 | jmvivo | |
86 | <property name="mandatoryProjets" value=" |
||
87 | _fwAndami,
|
||
88 | libCorePlugin,
|
||
89 | libFMap,
|
||
90 | appgvSIG,
|
||
91 | extJCRS
|
||
92 | "/> |
||
93 | |||
94 | <property name="global.installBaseDir" location="${andami}"/> |
||
95 | 13392 | jmvivo | |
96 | 13341 | cesar | <property name="JUnitProjectResults" value="JUnitProjectResults"/> |
97 | <property name="JUnitProjectResultsFile" value="JUnitProjectResults.txt"/> |
||
98 | <property name="JUnitGlobalResults" location="JUnitGlobalResults"/> |
||
99 | <property name="JUnitGlobalResultsFile" location="JUnitGlobalResults.txt"/> |
||
100 | <property name="JUnitSummaryFile" location="JUnitGlobalResults.txt"/> |
||
101 | <property name="FlagTestError" location="JUnitFlagError"/> |
||
102 | 13296 | jmvivo | |
103 | <!--
|
||
104 | ============================================
|
||
105 | 13423 | cesar | Targets for build of the appgvSIG project
|
106 | 13296 | jmvivo | ============================================
|
107 | -->
|
||
108 | |||
109 | 4907 | cesar | <target name="init"> |
110 | <!-- Create the time stamp -->
|
||
111 | <tstamp/> |
||
112 | 7210 | cesar | <echo>
|
113 | Compiling ${ant.project.name}...</echo>
|
||
114 | 10187 | jmvivo | |
115 | <property file="build.number"/> |
||
116 | 4907 | cesar | <!-- Creamos un fichero con el timeStamp para que lo lea el FPanelAbout -->
|
117 | <!-- <buildnumber/> -->
|
||
118 | </target>
|
||
119 | 4143 | caballero | |
120 | 4907 | cesar | <target name="dist" |
121 | 9200 | jmvivo | depends="init,create-jar,copy-libs,copy-data-files,move-to-andami" |
122 | 7139 | cesar | description="Generate the distribution of the gvSIG plugin. To build just the appgvSIG project from Eclipse " > |
123 | 9776 | cesar | <!-- Create the distribution directory -->
|
124 | 4907 | cesar | </target>
|
125 | 13126 | jmvivo | |
126 | 4907 | cesar | <target name="compile" description="compile the source"> |
127 | <!-- Create the time stamp -->
|
||
128 | <tstamp/> |
||
129 | <!-- Create the build directory structure used by compile -->
|
||
130 | <mkdir dir="${build}"/> |
||
131 | <!-- Compile the Java code from ${src} to ${build} -->
|
||
132 | 13126 | jmvivo | <loadEclipseClasspath project="${basedir}"/> |
133 | 13296 | jmvivo | <gvSIG-javac
|
134 | 13423 | cesar | classpath="${eclipseClasspath}"/> |
135 | 312 | fernando | |
136 | 13126 | jmvivo | </target>
|
137 | |||
138 | 4907 | cesar | <target name="create-jar" description="Creates the jar file"> |
139 | <mkdir dir="${dist}/lib"/> |
||
140 | <jar jarfile="${dist}/lib/${plugin}.jar" basedir="${build}"/> |
||
141 | </target>
|
||
142 | 13126 | jmvivo | |
143 | <target name="copy-libs"> |
||
144 | 4907 | cesar | <!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file -->
|
145 | <copy todir="${dist}/lib"> |
||
146 | <fileset dir="./lib" includes="*.jar,*.zip"/> |
||
147 | </copy>
|
||
148 | 13296 | jmvivo | <ant dir="../libFMap" target="batch-build" inheritAll="false"> |
149 | 9200 | jmvivo | <property name="debug" value="${debug}"/> |
150 | <property name="debuglevel" value="${debuglevel}"/> |
||
151 | <property name="encoding" value="ISO_8859_1"/> |
||
152 | </ant>
|
||
153 | 4907 | cesar | <copy todir="${dist}/lib"> |
154 | 9200 | jmvivo | <fileset dir="${fmapdir}/dist/lib/" includes="*.jar,*.zip"/> |
155 | 4907 | cesar | </copy>
|
156 | 9200 | jmvivo | |
157 | 4907 | cesar | </target>
|
158 | 13126 | jmvivo | |
159 | 13296 | jmvivo | <target name="batch-build" |
160 | description="Global build for the whole gvSIG + extensions. Compiles all the sources and builds the application so that it's ready to execute" |
||
161 | depends="init,compile,create-jar,copy-libs,copy-data-files,move-to-andami"> |
||
162 | </target>
|
||
163 | |||
164 | 4907 | cesar | <target name="copy-data-files"> |
165 | 5489 | cesar | <copy todir="${dist}"> |
166 | <fileset dir="config" includes="*" /> |
||
167 | </copy>
|
||
168 | 4907 | cesar | <copy file="build.number" todir="${dist}"/> |
169 | <copy todir="${dist}/images"> |
||
170 | <fileset dir="images/" includes="*"/> |
||
171 | </copy>
|
||
172 | <copy todir="${dist}/northimages"> |
||
173 | <fileset dir="northimages/" includes="*"/> |
||
174 | </copy>
|
||
175 | </target>
|
||
176 | 13126 | jmvivo | |
177 | 4907 | cesar | <target name="move-to-andami" description="Moves the build directory to andami"> |
178 | <move todir="${extensionDir}/${plugin}/"> |
||
179 | <fileset dir="${dist}" includes="**/**"/> |
||
180 | </move>
|
||
181 | </target>
|
||
182 | |||
183 | <target name="clean" |
||
184 | description="clean up" > |
||
185 | <!-- Delete the ${build} and ${dist} directory trees -->
|
||
186 | <delete dir="${build}"/> |
||
187 | 13296 | jmvivo | <!--<delete dir="${dist}"/> -->
|
188 | 4907 | cesar | </target>
|
189 | 13531 | jmvivo | |
190 | 13423 | cesar | <target name="run-tests" depends="batch-build,compile-tests"> |
191 | 13360 | cesar | <antcall target="generic-run-tests"> |
192 | <param name="TestSuite.Name" value="com.iver.cit.gvsig.AllTests"/> |
||
193 | </antcall>
|
||
194 | </target>
|
||
195 | 13126 | jmvivo | |
196 | 13296 | jmvivo | <!--
|
197 | ============================================
|
||
198 | Targets for global build
|
||
199 | ============================================
|
||
200 | -->
|
||
201 | 13126 | jmvivo | |
202 | 13296 | jmvivo | <!-- Public Targets -->
|
203 | 16252 | jmvivo | <!-- Comment to use it with debug on
|
204 | 13296 | jmvivo | <target name="make-binary-distribution"
|
205 | description="
|
||
206 | Prepare for do a binary distribution of the application.
|
||
207 | This increments the build number and then makes a global build"
|
||
208 | depends="clean-all,buildNumber,build-all-DebugOff">
|
||
209 | </target>
|
||
210 | 16252 | jmvivo | -->
|
211 | <target name="make-binary-distribution" |
||
212 | description=" |
||
213 | Prepare for do a binary distribution of the application.
|
||
214 | This increments the build number and then makes a global build"
|
||
215 | depends="clean-all,buildNumber,build-all"> |
||
216 | </target>
|
||
217 | 13126 | jmvivo | |
218 | 13296 | jmvivo | <target name="make-binary-distribution-JS1.5_JT1.4" |
219 | description=" |
||
220 | Prepare for do a binary distribution of the application.
|
||
221 | This increments the build number and then makes a global build.
|
||
222 | Source Java 1.5 and Target Java 1.4"
|
||
223 | depends="clean-all,buildNumber,build-all-JS1.5_JT1.4-DebugOff"> |
||
224 | </target>
|
||
225 | 13126 | jmvivo | |
226 | 13296 | jmvivo | <target name="make-binary-distribution-test" |
227 | description=" |
||
228 | Prepare for a binary distribution of the application
|
||
229 | without increments the global build number"
|
||
230 | depends="clean-all,build-all-DebugOff"> |
||
231 | </target>
|
||
232 | 5849 | cesar | |
233 | 13296 | jmvivo | <target name="make-binary-distribution-JS1.5_JT1.4-test" |
234 | description=" |
||
235 | Prepare for a binary distribution of the application
|
||
236 | without increments the global build number.
|
||
237 | Source Java 1.5 and Target Java 1.4"
|
||
238 | depends="clean-all,build-all-JS1.5_JT1.4-DebugOff"> |
||
239 | </target>
|
||
240 | 13126 | jmvivo | |
241 | 13296 | jmvivo | <target name="clean_andami_gvSIGdir" |
242 | description="clean up the gvSIG andami deploy"> |
||
243 | <delete dir="${andami}/gvSIG" failonerror="false"/> |
||
244 | </target>
|
||
245 | 10187 | jmvivo | |
246 | 5849 | cesar | <target name="build-all" |
247 | 13296 | jmvivo | description=" |
248 | Global build for the whole gvSIG.
|
||
249 | Compiles all the sources and builds the application so that it's ready to execute
|
||
250 | "> |
||
251 | 18047 | jmvivo | <antcall target="build-all-projects"> |
252 | <param name="debug" value="on"/> |
||
253 | <param name="debuglevel" value="lines, vars"/> |
||
254 | </antcall>
|
||
255 | 6296 | cesar | </target>
|
256 | 13126 | jmvivo | |
257 | 13296 | jmvivo | <target name="build-all-DebugOff" |
258 | description=" |
||
259 | Global build for the whole gvSIG.
|
||
260 | Compiles all the sources and builds the application so that it's ready to execute.
|
||
261 | Do not generate debug info in complilation.
|
||
262 | "> |
||
263 | <antcall target="build-all-projects"> |
||
264 | <param name="debug" value="off"/> |
||
265 | <param name="debuglevel" value=""/> |
||
266 | </antcall>
|
||
267 | 6296 | cesar | </target>
|
268 | 13126 | jmvivo | |
269 | 13296 | jmvivo | <target name="build-all-JS1.5_JT1.4" |
270 | description=" |
||
271 | Global build for the whole gvSIG.
|
||
272 | Compiles all the sources and builds the application so that it's ready to execute.
|
||
273 | Source Java 1.5 and Target Java 1.4
|
||
274 | "> |
||
275 | <antcall target="build-all-projects"> |
||
276 | <param name="JavaSourceVersion" value="1.5"/> |
||
277 | <param name="JavaTargetVersion" value="jsr14"/> |
||
278 | 13126 | jmvivo | </antcall>
|
279 | 13296 | jmvivo | </target>
|
280 | 13126 | jmvivo | |
281 | 13296 | jmvivo | <target name="build-all-JS1.5_JT1.4-DebugOff" |
282 | description=" |
||
283 | Global build for the whole gvSIG.
|
||
284 | Compiles all the sources and builds the application so that it's ready to execute.
|
||
285 | Source Java 1.5 and Target Java 1.4.
|
||
286 | Do not generate debug info in complilation.
|
||
287 | "> |
||
288 | <antcall target="build-all-projects"> |
||
289 | <param name="JavaSourceVersion" value="1.5"/> |
||
290 | <param name="JavaTargetVersion" value="jsr14"/> |
||
291 | <param name="debug" value="off"/> |
||
292 | <param name="debuglevel" value=""/> |
||
293 | </antcall>
|
||
294 | 13126 | jmvivo | </target>
|
295 | |||
296 | |||
297 | 13296 | jmvivo | <target name="build-all-projects" |
298 | 13126 | jmvivo | description="Builds the application, excluding extensions"> |
299 | <property file="build.number"/> |
||
300 | 13533 | mhaloui | <foreach list="${gvSIG_projects}" trim="true" delimiter="," target="batch-build-project" param="bb-project.name"/> |
301 | 5849 | cesar | </target>
|
302 | 12696 | cesar | |
303 | 5849 | cesar | <target name="clean-all" |
304 | 13296 | jmvivo | depends="clean_andami_gvSIGdir,clean-all-projects" |
305 | description="clean up application and projets" /> |
||
306 | 13126 | jmvivo | |
307 | 13296 | jmvivo | <target name="clean-all-projects" |
308 | 13236 | jmvivo | description="cleans the base components of gvSIG: appgvSIG + libs"> |
309 | <!-- Delete the ${build} and ${dist} directory trees -->
|
||
310 | 13533 | mhaloui | <foreach list="${gvSIG_projects}" trim="true" delimiter="," target="clean-project" param="c-project.name"/> |
311 | 5849 | cesar | </target>
|
312 | 13126 | jmvivo | |
313 | 5852 | cesar | <target name="install-all" |
314 | 13296 | jmvivo | depends="install-all-projects" |
315 | 7139 | cesar | description="Generate jars and copy files to Andami for the whole application (gvSIG+libs+extensions). Compilation is supposed to be automatically done by Eclipse" /> |
316 | 13126 | jmvivo | |
317 | 13296 | jmvivo | <target name="install-all-projects" |
318 | 7139 | cesar | description="Generate jars and copy files to Andami for the application (gvSIG+libs). Compilation is supposed to be automatically done by Eclipse" > |
319 | 13533 | mhaloui | <foreach list="${gvSIG_projects}" trim="true" delimiter="," target="install-project" param="i-project.name"/> |
320 | 7139 | cesar | </target>
|
321 | 13126 | jmvivo | |
322 | 13798 | jmvivo | <target name="update-all-classpath-files" |
323 | description="Updates the timestamp of all projects. |
||
324 | This force eclipse to update jar missing errors."> |
||
325 | <foreach list="${gvSIG_projects}" trim="true" delimiter="," target="update-proyect-classpath-file" param="u-cp-project.name"/> |
||
326 | </target>
|
||
327 | |||
328 | |||
329 | |||
330 | 13296 | jmvivo | <!-- utility targets -->
|
331 | |||
332 | 13798 | jmvivo | |
333 | 13296 | jmvivo | <target name="buildNumber" |
334 | description="Generates the build.number for the application"> |
||
335 | <propertyfile
|
||
336 | file="build.number" |
||
337 | comment="Build Number for ANT. Do not edit!"> |
||
338 | 13807 | jmvivo | <entry key="build.number" default="0" type="int" operation="+" pattern="0000"/> |
339 | 13296 | jmvivo | </propertyfile>
|
340 | 7139 | cesar | </target>
|
341 | 5852 | cesar | |
342 | 13296 | jmvivo | <target name="install-project"> |
343 | <property name="i-project.dir" location="../${i-project.name}"/> |
||
344 | <if>
|
||
345 | <available file="${i-project.dir}" type="dir"/> |
||
346 | <then>
|
||
347 | <echo>
|
||
348 | Install ${i-project.name} |
||
349 | </echo>
|
||
350 | <ant dir="${i-project.dir}" inheritAll="false"> |
||
351 | <property name="buildNumberFile" location="build.number"/> |
||
352 | </ant>
|
||
353 | </then>
|
||
354 | <else>
|
||
355 | <if>
|
||
356 | <contains string="${mandatoryProjets}" substring="${i-project.name}"/> |
||
357 | <then>
|
||
358 | <fail message="The required project is missing for Install: ${i-project.name}"/> |
||
359 | </then>
|
||
360 | <else>
|
||
361 | <echo>
|
||
362 | Skip ${i-project.name} project from Intall |
||
363 | </echo>
|
||
364 | </else>
|
||
365 | </if>
|
||
366 | </else>
|
||
367 | </if>
|
||
368 | </target>
|
||
369 | 13126 | jmvivo | |
370 | |||
371 | 13423 | cesar | <target name="clean-project"> |
372 | <property name="c-project.dir" location="../${c-project.name}"/> |
||
373 | 13296 | jmvivo | <if>
|
374 | 13423 | cesar | <available file="${c-project.dir}" type="dir"/> |
375 | 13296 | jmvivo | <then>
|
376 | <echo>
|
||
377 | 13423 | cesar | Clean ${c-project.name} |
378 | 13296 | jmvivo | </echo>
|
379 | 13423 | cesar | <ant dir="${c-project.dir}" target="clean" inheritAll="false"/> |
380 | 13296 | jmvivo | </then>
|
381 | <else>
|
||
382 | <if>
|
||
383 | 13423 | cesar | <contains string="${mandatoryProjets}" substring="${c-project.name}"/> |
384 | 13296 | jmvivo | <then>
|
385 | 13423 | cesar | <fail message="The required project is missing for Clean: ${c-project.name}"/> |
386 | 13296 | jmvivo | </then>
|
387 | <else>
|
||
388 | <echo>
|
||
389 | 13423 | cesar | Skip ${c-project.name} project from Clean |
390 | 13296 | jmvivo | </echo>
|
391 | </else>
|
||
392 | </if>
|
||
393 | </else>
|
||
394 | </if>
|
||
395 | 5849 | cesar | </target>
|
396 | |||
397 | 13296 | jmvivo | <target name="batch-build-project"> |
398 | <property name="bb-project.dir" location="../${bb-project.name}"/> |
||
399 | <if>
|
||
400 | <available file="${bb-project.dir}" type="dir"/> |
||
401 | <then>
|
||
402 | <echo>
|
||
403 | Batch-build ${bb-project.name} |
||
404 | </echo>
|
||
405 | <ant dir="${bb-project.dir}" target="batch-build" inheritAll="false"> |
||
406 | <property name="debug" value="${debug}"/> |
||
407 | <property name="debuglevel" value="${debuglevel}"/> |
||
408 | <property name="encoding" value="${encoding}"/> |
||
409 | <property name="JavaSourceVersion" value="${JavaSourceVersion}"/> |
||
410 | <property name="JavaTargetVersion" value="${JavaTargetVersion}"/> |
||
411 | <property name="buildNumberFile" location="build.number"/> |
||
412 | </ant>
|
||
413 | </then>
|
||
414 | <else>
|
||
415 | <if>
|
||
416 | <contains string="${mandatoryProjets}" substring="${bb-project.name}"/> |
||
417 | <then>
|
||
418 | <fail message="The required project is missing for Batch build: ${bb-extension.name}"/> |
||
419 | </then>
|
||
420 | <else>
|
||
421 | <echo>
|
||
422 | Skip ${bb-project.name} project from Batch build |
||
423 | </echo>
|
||
424 | </else>
|
||
425 | </if>
|
||
426 | </else>
|
||
427 | </if>
|
||
428 | </target>
|
||
429 | 13392 | jmvivo | |
430 | 13798 | jmvivo | <target name="update-proyect-classpath-file"> |
431 | <property name="u-cp-project.dir" location="../${u-cp-project.name}"/> |
||
432 | <if>
|
||
433 | <available file="${u-cp-project.dir}" type="dir"/> |
||
434 | <then>
|
||
435 | <if>
|
||
436 | <available file="${u-cp-project.dir}/.classpath" type="file"/> |
||
437 | <then>
|
||
438 | <touch file="${u-cp-project.dir}/.classpath"/> |
||
439 | <echo>
|
||
440 | Update classpath file of ${u-cp-project.name} |
||
441 | </echo>
|
||
442 | </then>
|
||
443 | </if>
|
||
444 | </then>
|
||
445 | <else>
|
||
446 | <if>
|
||
447 | <contains string="${mandatoryProjets}" substring="${u-cp-project.name}"/> |
||
448 | <then>
|
||
449 | <if>
|
||
450 | <available file="${u-cp-project.dir}/.classpath" type="file"/> |
||
451 | <then>
|
||
452 | <fail message="The required project is missing for Update classpath file: ${u-cp-project.name}"/> |
||
453 | </then>
|
||
454 | </if>
|
||
455 | </then>
|
||
456 | <else>
|
||
457 | <echo>
|
||
458 | Skip ${u-cp-project.name} project from Update classpath file |
||
459 | </echo>
|
||
460 | </else>
|
||
461 | </if>
|
||
462 | </else>
|
||
463 | </if>
|
||
464 | </target>
|
||
465 | |||
466 | 13341 | cesar | <target name="run-one-test"> |
467 | <property name="target.project.dir" location="../${target.project.name}"/> |
||
468 | <if>
|
||
469 | <available file="${target.project.dir}" type="dir"/> |
||
470 | <then>
|
||
471 | <echo>
|
||
472 | Running tests: ${target.project.dir} |
||
473 | </echo>
|
||
474 | <trycatch property="AnErrorHappened"> |
||
475 | <try>
|
||
476 | <ant dir="${target.project.dir}" |
||
477 | target="run-tests" |
||
478 | inheritAll="false"> |
||
479 | <property name="JUnitProjectResults" value="${JUnitProjectResults}"/> |
||
480 | <property name="JUnitProjectResultsFile" value="${JUnitProjectResultsFile}"/> |
||
481 | <property name="JUnitGlobalResults" value="${JUnitGlobalResults}"/> |
||
482 | <property name="JUnitGlobalResultsFile" value="${JUnitGlobalResultsFile}"/> |
||
483 | <property name="JUnitSummaryFile" value="${JUnitSummaryFile}"/> |
||
484 | 13525 | cesar | <property name="buildNumberFile" location="${buildNumberFile}"/> |
485 | 13341 | cesar | </ant>
|
486 | </try>
|
||
487 | <catch>
|
||
488 | <echo level="error" |
||
489 | append="true" |
||
490 | file="${FlagTestError}">${target.project.name}: ${AnErrorHappened}</echo> |
||
491 | <echo level="error">${target.project.name}: ${AnErrorHappened}</echo> |
||
492 | 13650 | cesar | <echo append="true" file="${JUnitGlobalResultsFile}">JUnitTests for ${target.project.name}: FAILED.${line.separator}</echo> |
493 | 13660 | cesar | <echo append="true" file="${target.project.dir}/${JUnitProjectResultsFile}">${AnErrorHappened}</echo> |
494 | 13341 | cesar | </catch>
|
495 | </trycatch>
|
||
496 | </then>
|
||
497 | <else>
|
||
498 | 13641 | cesar | <echo>
|
499 | Skip ${target.project.dir} project from RunTests |
||
500 | </echo>
|
||
501 | 13650 | cesar | <echo append="true" file="${JUnitGlobalResultsFile}">JUnitTests for ${target.project.name}: SKIPPED.${line.separator}</echo> |
502 | 13341 | cesar | </else>
|
503 | </if>
|
||
504 | </target>
|
||
505 | 13392 | jmvivo | |
506 | 13341 | cesar | <target name="run-all-tests"> |
507 | <delete file="${FlagTestError}" /> |
||
508 | <move file="${JUnitGlobalResultsFile}" |
||
509 | tofile="${JUnitGlobalResults}.old" |
||
510 | failonerror="false" /> |
||
511 | 13525 | cesar | <property name="buildNumberFile" location="build.number"/> |
512 | 13341 | cesar | <foreach list="${gvSIG_projects}" |
513 | delimiter="," |
||
514 | 13638 | jmvivo | trim="true" |
515 | 13341 | cesar | target="run-one-test" |
516 | 13525 | cesar | param="target.project.name"> |
517 | <param name="buildNumberFile" location="${buildNumberFile}"/> |
||
518 | </foreach>
|
||
519 | 13392 | jmvivo | |
520 | 13357 | cesar | <foreach list="${gvSIG_projects}" |
521 | 13638 | jmvivo | trim="true" |
522 | 13357 | cesar | delimiter="," |
523 | target="concat-test-output" |
||
524 | param="target.project.name" /> |
||
525 | 5849 | cesar | |
526 | 13341 | cesar | <if>
|
527 | <available file="${FlagTestError}" type="file"/> |
||
528 | <then>
|
||
529 | 13423 | cesar | <echo file="${JUnitGlobalResultsFile}.tmp"> === Global JUnit Results: FAILURE.${line.separator}${line.separator}</echo> |
530 | <concat destfile="${JUnitGlobalResultsFile}.tmp2" |
||
531 | binary="true"> |
||
532 | <fileset file="${JUnitGlobalResultsFile}.tmp"/> |
||
533 | <fileset file="${JUnitGlobalResultsFile}"/> |
||
534 | </concat>
|
||
535 | <move file="${JUnitGlobalResultsFile}.tmp2" tofile="${JUnitGlobalResultsFile}"/> |
||
536 | <delete file="${JUnitGlobalResultsFile}.tmp"/> |
||
537 | 13357 | cesar | <echo level="error">JUnitTests: FAILURE. |
538 | 13341 | cesar | See ${JUnitGlobalResultsFile} file for details. |
539 | </echo>
|
||
540 | </then>
|
||
541 | <else>
|
||
542 | 13423 | cesar | <echo file="${JUnitGlobalResultsFile}.tmp"> === Global JUnit Results: SUCCESS.${line.separator}${line.separator}</echo> |
543 | <concat destfile="${JUnitGlobalResultsFile}.tmp2" |
||
544 | binary="true"> |
||
545 | <fileset file="${JUnitGlobalResultsFile}.tmp"/> |
||
546 | <fileset file="${JUnitGlobalResultsFile}"/> |
||
547 | </concat>
|
||
548 | <move file="${JUnitGlobalResultsFile}.tmp2" tofile="${JUnitGlobalResultsFile}"/> |
||
549 | <delete file="${22JUnitGlobalResultsFile}.tmp"/> |
||
550 | 13341 | cesar | <echo>JUnitTests: SUCCESS.
|
551 | See ${JUnitGlobalResultsFile} file for details. |
||
552 | </echo>
|
||
553 | </else>
|
||
554 | </if>
|
||
555 | 13357 | cesar | <delete file="${FlagTestError}" /> |
556 | 13341 | cesar | </target>
|
557 | 13126 | jmvivo | |
558 | 312 | fernando | </project>
|