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