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