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