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