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