Statistics
| Revision:

svn-gvsig-desktop / trunk / applications / appgvSIG / build.xml @ 12696

History | View | Annotate | Download (34 KB)

1
<project name="appgvSIG" default="dist" basedir=".">
2
    <description>
3
        Instala el plugin
4
    </description>
5
        <!-- set global properties for this build -->
6
        <!-- <property name="buildDate" value="20041018"/> -->
7
        <property name="version" value="1.1 ${eclipse.startTime}"/>
8
        <property name="src" location="src"/>
9
        <property name="build" location="bin"/>
10
        <property name="dist"  location="dist"/>
11
        <property name="lib"   location="lib"/>
12
        <property name="plugin" value="com.iver.cit.gvsig"/>
13
        <property name="fmapdir" value="../libFMap"/>
14
        <property name="extensionDir" location="../_fwAndami/gvSIG/extensiones"/>
15
        <property name="andamiLibs" location="../_fwAndami/lib"/>
16
        <property name="fmapLibs"   location="../libFMap/lib"/>
17
        <property name="andamiJar"  location="../_fwAndami/andami.jar"/>
18
        <property name="makeZip" location="makeZip"/>
19
        <property name="zipName" value="gvSIG-${version}"/>
20
        <import file="compile-classpath.xml"/>
21
        <import file="../_fwAndami/compile-classpath.xml"/>
22
        <import file="../libFMap/compile-classpath.xml"/>
23
        <property name="build-doc" value="build-doc"/>
24
        <property name="JavaSourceVersion" value="1.5"/>
25
        <property name="JavaTargetVersion" value="1.5"/>
26
        <property name="encoding" value="ISO_8859_1"/>
27
                
28
        <target name="init">
29
                <!-- Create the time stamp -->
30
                <tstamp/>
31
                <echo>
32
                        Compiling ${ant.project.name}...</echo>
33

    
34
                <property file="build.number"/>
35
                <!-- Creamos un fichero con el timeStamp para que lo lea el FPanelAbout -->
36
                <!-- <buildnumber/> -->
37
        </target>
38

    
39
        <target name="build-doc" depends="" description="Genera un zip con la documentación">
40
                <javadoc
41
                        packagenames="com.iver.cit.gvsig.*"
42
                        sourcepath="src"
43
                        defaultexcludes="yes"
44
                        destdir="${build-doc}/gvSIG-api"
45
                        windowtitle="gvSIG API">
46
                </javadoc>
47
        </target>
48

    
49
        <target name="dist"
50
                                depends="init,create-jar,copy-libs,copy-data-files,move-to-andami"
51
                                description="Generate the distribution of the gvSIG plugin. To build just the appgvSIG project from Eclipse " >
52
                <!-- Create the distribution directory -->
53
        </target>
54
        
55
        <target name="make-binary-distribution"
56
                        description="Prepare a binary distribution of the application. This increments the build number and then makes a global build"
57
                        depends="buildNumber,build-all">                
58
        </target>
59
        <target name="batch-build"
60
                        description="Global build for the whole gvSIG + extensions. Compiles all the sources and builds the application so that it's ready to execute"
61
                        depends="init,compile,create-jar,copy-libs,copy-data-files,move-to-andami">
62
        </target>
63
        
64
        <target name="compile" description="compile the source">
65
                <!-- Create the time stamp -->
66
                <tstamp/>
67
                <!-- Create the build directory structure used by compile -->
68
                <mkdir dir="${build}"/>
69
                <!-- Creamos un fichero con el timeStamp para que lo lea el FPanelAbout -->
70
                <!-- <buildnumber />-->
71
                <!-- Compile the Java code from ${src} to ${build} -->
72
                <javac  srcdir="${src}"
73
                        destdir="${build}"
74
                        source="${JavaSourceVersion}"
75
                        target="${JavaTargetVersion}"
76
                        debug="${debug}"
77
                        debuglevel="${debuglevel}"
78
                        excludes="com/iver/cit/gvsig/test/**"
79
                        encoding="${encoding}">
80
                <classpath refid="appgvSIG.compile-classpath"/>
81
                        <classpath refid="libFMap.compile-classpath"/>
82
<!--                <classpath refid="_fwAndami.compile-classpath"/> -->
83
                </javac>
84
        </target>        
85

    
86
        <target name="create-jar" description="Creates the jar file">
87
                <mkdir dir="${dist}/lib"/>
88
                <jar jarfile="${dist}/lib/${plugin}.jar" basedir="${build}"/>
89
        </target>
90
        
91
        <target name="copy-libs">                
92
                <!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file -->
93
                <copy todir="${dist}/lib">
94
                        <fileset dir="./lib" includes="*.jar,*.zip"/>
95
                </copy>
96
                <ant dir="${fmap}" target="batch-build" inheritAll="false">
97
                        <property name="debug" value="${debug}"/>
98
                        <property name="debuglevel" value="${debuglevel}"/>
99
                        <property name="encoding" value="ISO_8859_1"/>
100
                </ant>
101
                <copy todir="${dist}/lib">
102
                        <fileset dir="${fmapdir}/dist/lib/" includes="*.jar,*.zip"/>
103
                </copy>
104

    
105
        </target>
106
        
107
        <target name="copy-data-files">
108
        <copy todir="${dist}">
109
                <fileset dir="config" includes="*" />
110
        </copy>
111
                <copy file="build.number" todir="${dist}"/>
112
                <copy todir="${dist}/images">
113
                        <fileset dir="images/" includes="*"/>
114
                </copy>
115
                <copy todir="${dist}/northimages">
116
                        <fileset dir="northimages/" includes="*"/>
117
                </copy>
118
    </target>
119
        
120
        <target name="move-to-andami" description="Moves the build directory to andami">
121
                <move todir="${extensionDir}/${plugin}/">
122
                        <fileset dir="${dist}" includes="**/**"/>
123
                </move>
124
        </target>
125

    
126
        <target name="clean"
127
                        description="clean up" >
128
                <!-- Delete the ${build} and ${dist} directory trees -->
129
                <delete dir="${build}"/>
130
<!--                <delete dir="${dist}"/> -->
131
        </target>
132
        
133
        
134
        <!-- the global build starts here -->
135
        <property name="andami" location="../_fwAndami"/>
136
        <property name="utiles" location="../libIverUtiles"/>
137
        <property name="core" location="../libCorePlugin"/>
138
        <property name="driver" location="../libDriverManager"/>
139
        <property name="cms" location="../libCq CMS for java"/>
140
        <property name="libraster" location="../libRaster"/>
141
        <property name="fmap" location="../libFMap"/>
142
        <property name="gvSIG" location="../appgvSIG"/>
143
        <property name="remote" location="../libRemoteServices"/>
144
        <property name="gdbms" location="../libGDBMS"/>
145
        <property name="i18n" location="../libInternationalization"/>
146
        <property name="global.installBaseDir" location="${andami}"/>
147
        <property name="exceptions" location="../libExceptions"/>
148

    
149
        <target name="buildNumber"
150
                                description="Generates the build.number for the application">
151
                <propertyfile 
152
                                file="build.number"
153
                                comment="Build Number for ANT. Do not edit!">
154
                        <entry  key="build.number" default="0" type="int" operation="+"/>
155
                </propertyfile>
156
        </target>
157

    
158
        <target name="build-all"
159
                                depends="debug-no,base,extensions"
160
                                description="Global build for the whole gvSIG + extensions. Compiles all the sources and builds the application so that it's ready to execute" />
161
        
162
        <target name="eclipse-build-all"
163
                                        depends="debug-yes,base,extensions"
164
                                        description="Builds the application, including extensions, producing debug info" />
165
        
166
        <target name="debug-yes">
167
                <property name="debug" value="on"/>
168
                <property name="debuglevel" value="lines, vars"/>
169
        </target>
170
        
171
        <target name="debug-no">
172
                <property name="debug" value="off"/>
173
        </target>
174
        
175
        <target name="eclipse-base" depends="debug-yes,base" />
176
        <target name="eclipse-extensions" depends="debug-yes,base,extensions" />
177
        
178
        <property name="encoding" value="ISO_8859_1" />
179
        <property name="sourceVersion" value="1.5" />
180
        <property name="targetVersion" value="1.5" />
181
        
182
        <target name="base"
183
                        description="Builds the application, excluding extensions">
184
                <property file="build.number"/>
185
                <!-- allow i18n to be skipped -->
186
                <condition property="i18n.Dir" value="${i18n}" else="scripts/voidTarget">
187
                        <available file="${i18n}" type="dir"/>
188
                </condition>
189
                  <ant dir="${i18n.Dir}" target="batch-build" inheritAll="false">
190
                        <property name="debug" value="${debug}"/>
191
                        <property name="debuglevel" value="${debuglevel}"/>
192
                        <property name="encoding" value="${encoding}"/>
193
                        <property name="projectName" value="${i18n}" />
194
                </ant>
195
                <!-- allow exceptions to be skipped -->
196
                <condition property="exceptions.Dir" value="${exceptions}" else="scripts/voidTarget">
197
                        <available file="${exceptions}" type="dir"/>
198
                </condition>
199
                <ant dir="${exceptions.Dir}" target="batch-build" inheritAll="false">
200
                        <property name="debug" value="${debug}"/>
201
                        <property name="debuglevel" value="${debuglevel}"/>
202
                        <property name="encoding" value="${encoding}"/>
203
                        <property name="projectName" value="${exceptions}" />
204
                </ant>
205
                <condition property="utiles.Dir" value="${utiles}" else="scripts/voidTarget">
206
                        <available file="${utiles}" type="dir"/>
207
                </condition>
208
                <ant dir="${utiles.Dir}" target="batch-build" inheritAll="false">
209
                        <property name="debug" value="${debug}"/>
210
                        <property name="debuglevel" value="${debuglevel}"/>
211
                        <property name="encoding" value="${encoding}"/>
212
                        <property name="projectName" value="${utiles}" />
213
                        <property name="JavaSourceVersion" value="${JavaSourceVersion}"/>
214
                        <property name="JavaTargetVersion" value="${JavaTargetVersion}"/>
215
                </ant>
216
                <ant dir="${andami}" target="batch-build"  inheritAll="false">
217
                        <property name="debug" value="${debug}"/>
218
                        <property name="debuglevel" value="${debuglevel}"/>
219
                        <property name="encoding" value="${encoding}"/>
220
                </ant>
221
                <condition property="libui.Dir" value="${libui}" else="scripts/voidTarget">
222
                        <available file="${libui}" type="dir"/>
223
                </condition>
224
                <ant dir="${libui.Dir}" target="batch-build" inheritAll="false">
225
                        <property name="debug" value="${debug}"/>
226
                        <property name="debuglevel" value="${debuglevel}"/>
227
                        <property name="installBaseDir" value="${global.installBaseDir}"/>
228
                        <property name="encoding" value="${encoding}"/>
229
                        <property name="projectName" value="${libui}" />
230
                </ant>
231
                <ant dir="${core}" target="import-build-number" inheritAll="false">
232
                        <property name="buildNumberFile" location="build.number"/>
233
                </ant>
234
                <ant dir="${core}" target="batch-build"  inheritAll="false">
235
                        <property name="debug" value="${debug}"/>
236
                        <property name="debuglevel" value="${debuglevel}"/>
237
                        <property name="encoding" value="${encoding}"/>
238
                </ant>
239
                <condition property="cms.Dir" value="${cms}" else="scripts/voidTarget">
240
                        <available file="${cms}" type="dir"/>
241
                </condition>
242
                <ant dir="${cms.Dir}" target="batch-build"  inheritAll="false">
243
                        <property name="debug" value="${debug}"/>
244
                        <property name="debuglevel" value="${debuglevel}"/>
245
                        <property name="encoding" value="${encoding}"/>
246
                        <property name="projectName" value="${cms}" />
247
                </ant>
248
                <condition property="libraster.Dir" value="${libraster}" else="scripts/voidTarget">
249
                        <available file="${libraster}" type="dir"/>
250
                </condition>
251
                <ant dir="${libraster.Dir}" target="batch-build"  inheritAll="false">
252
                        <property name="debug" value="${debug}"/>
253
                        <property name="debuglevel" value="${debuglevel}"/>
254
                        <property name="encoding" value="${encoding}"/>
255
                        <property name="projectName" value="${libraster}" />
256
                </ant>
257
                <condition property="cms.Dir" value="${cms}" else="scripts/voidTarget">
258
                        <available file="${cms}" type="dir"/>
259
                </condition>
260
                <ant dir="${cms.Dir}" target="batch-build"  inheritAll="false">
261
                        <property name="debug" value="${debug}"/>
262
                        <property name="debuglevel" value="${debuglevel}"/>
263
                        <property name="encoding" value="${encoding}"/>
264
                        <property name="projectName" value="${cms}" />
265
                </ant>
266
                <condition property="driver.Dir" value="${driver}" else="scripts/voidTarget">
267
                        <available file="${driver}" type="dir"/>
268
                </condition>
269
                <ant dir="${driver.Dir}" target="batch-build"  inheritAll="false">
270
                        <property name="debug" value="${debug}"/>
271
                        <property name="debuglevel" value="${debuglevel}"/>
272
                        <property name="encoding" value="${encoding}"/>
273
                        <property name="projectName" value="${driver}" />
274
                </ant>
275
                <condition property="remote.Dir" value="${remote}" else="scripts/voidTarget">
276
                        <available file="${remote}" type="dir"/>
277
                </condition>
278
                <ant dir="${remote.Dir}" target="batch-build"  inheritAll="false">
279
                        <property name="debug" value="${debug}"/>
280
                        <property name="debuglevel" value="${debuglevel}"/>
281
                        <property name="encoding" value="${encoding}"/>
282
                        <property name="projectName" value="${remote}" />
283
                </ant>
284
                <ant dir="${gdbms}" target="batch-build" inheritAll="false">
285
                        <property name="debug" value="${debug}"/>
286
                        <property name="debuglevel" value="${debuglevel}"/>
287
                        <property name="encoding" value="${encoding}"/>
288
                </ant>
289
                <ant dir="${fmap}" target="batch-build"  inheritAll="false">
290
                        <property name="debug" value="${debug}"/>
291
                        <property name="debuglevel" value="${debuglevel}"/>
292
                        <property name="encoding" value="${encoding}"/>
293
                </ant>
294
                <ant dir="${gvSIG}" target="batch-build"  inheritAll="false">
295
                        <property name="debug" value="${debug}"/>
296
                        <property name="debuglevel" value="${debuglevel}"/>
297
                        <property name="encoding" value="${encoding}"/>
298
                </ant>
299
        </target>
300

    
301
        <property name="raster-se" location="../extRasterTools-SE"/>
302
        <property name="appcatalog" location="../appCatalogYNomenclatorClient"/>
303
        <property name="catalog" location="../extCatalogYNomenclator"/>
304
        <property name="dataloc" location="../extDataLocator"/>
305
        <property name="event" location="../extAddEventTheme"/>
306
        <property name="libdwg" location="../libDwg"/>
307
        <property name="extdwg" location="../extDwg"/>
308
        <property name="cad" location="../extCAD"/>
309
        <property name="rastertools" location="../extRasterTools"/>
310
        <property name="geoprocessing" location="../extGeoProcessing"/>
311
        <property name="geoprocessingExtensions" location="../extGeoprocessingExtensions"/>
312
        <property name="georeferencing" location="../extGeoreferencing"/>
313
        <property name="jdbc" location="../extJDBC"/>
314
        <property name="wcs" location="../extWCS"/>
315
        <property name="wfs" location="../extWFS2"/>
316
        <property name="wms" location="../extWMS"/>
317
        <property name="scripting" location="../extScripting"/>
318
        <property name="centerview" location="../extCenterViewToPoint"/>
319
        <property name="libui" location="../libUI"/>
320

    
321
        
322
        <target name="extensions" depends="base">
323
                <condition property="rastertools.Dir" value="${rastertools}" else="scripts/voidTarget">
324
                        <available file="${rastertools}" type="dir"/>
325
                </condition>
326
                <ant dir="${rastertools.Dir}" target="import-build-number" inheritAll="false">
327
                        <property name="buildNumberFile" location="build.number"/>
328
                </ant>
329
                <ant dir="${rastertools.Dir}" target="batch-build" inheritAll="false">
330
                        <property name="debug" value="${debug}"/>
331
                        <property name="debuglevel" value="${debuglevel}"/>
332
                        <property name="encoding" value="${encoding}"/>
333
                        <property name="projectName" value="${rastertools}" />
334
                </ant>
335
                <condition property="raster-se.Dir" value="${raster-se}" else="scripts/voidTarget">
336
                        <available file="${raster-se}" type="dir"/>
337
                </condition>
338
                <ant dir="${raster-se.Dir}" target="import-build-number" inheritAll="false">
339
                        <property name="buildNumberFile" location="build.number"/>
340
                </ant>
341
                <ant dir="${raster-se.Dir}" target="batch-build" inheritAll="false">
342
                        <property name="debug" value="${debug}"/>
343
                        <property name="debuglevel" value="${debuglevel}"/>
344
                        <property name="encoding" value="${encoding}"/>
345
                        <property name="projectName" value="${raster-se}" />
346
                </ant>
347
                <condition property="event.Dir" value="${event}" else="scripts/voidTarget">
348
                        <available file="${event}" type="dir"/>
349
                </condition>
350
                <ant dir="${event.Dir}" target="import-build-number" inheritAll="false">
351
                        <property name="buildNumberFile" location="build.number"/>
352
                </ant>
353
                <ant dir="${event.Dir}" target="batch-build" inheritAll="false">
354
                        <property name="debug" value="${debug}"/>
355
                        <property name="debuglevel" value="${debuglevel}"/>
356
                        <property name="encoding" value="${encoding}"/>
357
                        <property name="projectName" value="${event}" />
358
                </ant>
359
                <condition property="libdwg.Dir" value="${libdwg}" else="scripts/voidTarget">
360
                        <available file="${libdwg}" type="dir"/>
361
                </condition>
362
                <ant dir="${libdwg.Dir}" target="batch-build" inheritAll="false">
363
                        <property name="debug" value="${debug}"/>
364
                        <property name="debuglevel" value="${debuglevel}"/>
365
                        <property name="encoding" value="${encoding}"/>
366
                        <property name="sourceVersion" value="${sourceVersion}" />
367
                        <property name="targetVersion" value="${targetVersion}" />
368
                        <property name="projectName" value="${libdwg}" />
369
                </ant>
370
                <condition property="extdwg.Dir" value="${extdwg}" else="scripts/voidTarget">
371
                        <available file="${extdwg}" type="dir"/>
372
                </condition>
373
                <ant dir="${extdwg.Dir}" target="batch-build" inheritAll="false">
374
                        <property name="debug" value="${debug}"/>
375
                        <property name="debuglevel" value="${debuglevel}"/>
376
                        <property name="encoding" value="${encoding}"/>
377
                        <property name="projectName" value="${extdwg}" />
378
                </ant>
379
                <condition property="jdbc.Dir" value="${jdbc}" else="scripts/voidTarget">
380
                        <available file="${jdbc}" type="dir"/>
381
                </condition>
382
                <ant dir="${jdbc.Dir}" target="import-build-number" inheritAll="false">
383
                        <property name="buildNumberFile" location="build.number"/>
384
                </ant>
385
                <ant dir="${jdbc.Dir}" target="batch-build" inheritAll="false">
386
                        <property name="debug" value="${debug}"/>
387
                        <property name="debuglevel" value="${debuglevel}"/>
388
                        <property name="encoding" value="${encoding}"/>
389
                        <property name="projectName" value="${jdbc}" />
390
                </ant>
391
                <condition property="cad.Dir" value="${cad}" else="scripts/voidTarget">
392
                        <available file="${cad}" type="dir"/>
393
                </condition>
394
                <ant dir="${cad.Dir}" target="import-build-number" inheritAll="false">
395
                        <property name="buildNumberFile" location="build.number"/>
396
                </ant>
397
                <ant dir="${cad.Dir}" target="batch-build" inheritAll="false">
398
                        <property name="debug" value="${debug}"/>
399
                        <property name="debuglevel" value="${debuglevel}"/>
400
                        <property name="encoding" value="${encoding}"/>
401
                        <property name="projectName" value="${cad}" />
402
                </ant>
403
                <condition property="appcatalog.Dir" value="${appcatalog}" else="scripts/voidTarget">
404
                        <available file="${appcatalog}" type="dir"/>
405
                </condition>
406
                <ant dir="${appcatalog.Dir}" target="import-build-number" inheritAll="false">
407
                        <property name="buildNumberFile" location="build.number"/>
408
                </ant>
409
                <ant dir="${appcatalog.Dir}" target="batch-build" inheritAll="false">
410
                        <property name="debug" value="${debug}"/>
411
                        <property name="debuglevel" value="${debuglevel}"/>
412
                        <property name="encoding" value="${encoding}"/>
413
                        <property name="projectName" value="${appcatalog}" />
414
                </ant>
415
                <condition property="catalog.Dir" value="${catalog}" else="scripts/voidTarget">
416
                        <available file="${catalog}" type="dir"/>
417
                </condition>
418
                <ant dir="${catalog.Dir}" target="import-build-number" inheritAll="false">
419
                        <property name="buildNumberFile" location="build.number"/>
420
                </ant>
421
                <ant dir="${catalog.Dir}" target="batch-build" inheritAll="false">
422
                        <property name="debug" value="${debug}"/>
423
                        <property name="debuglevel" value="${debuglevel}"/>
424
                        <property name="encoding" value="${encoding}"/>
425
                        <property name="projectName" value="${catalog}" />
426
                </ant>
427
                <condition property="wcs.Dir" value="${wcs}" else="scripts/voidTarget">
428
                        <available file="${wcs}" type="dir"/>
429
                </condition>
430
                <ant dir="${wcs.Dir}" target="import-build-number" inheritAll="false">
431
                        <property name="buildNumberFile" location="build.number"/>
432
                </ant>
433
                <ant dir="${wcs.Dir}" target="batch-build" inheritAll="false">
434
                        <property name="debug" value="${debug}"/>
435
                        <property name="debuglevel" value="${debuglevel}"/>
436
                        <property name="encoding" value="${encoding}"/>
437
                        <property name="projectName" value="${wcs}" />
438
                </ant>
439
                <condition property="wms.Dir" value="${wms}" else="scripts/voidTarget">
440
                        <available file="${wms}" type="dir"/>
441
                </condition>
442
                <ant dir="${wms.Dir}" target="import-build-number" inheritAll="false">
443
                        <property name="buildNumberFile" location="build.number"/>
444
                </ant>
445
                <ant dir="${wms.Dir}" target="batch-build" inheritAll="false">
446
                        <property name="debug" value="${debug}"/>
447
                        <property name="debuglevel" value="${debuglevel}"/>
448
                        <property name="encoding" value="${encoding}"/>
449
                        <property name="projectName" value="${wms}" />
450
                </ant>
451
                <condition property="dataloc.Dir" value="${dataloc}" else="scripts/voidTarget">
452
                        <available file="${dataloc}" type="dir"/>
453
                </condition>
454
                <ant dir="${dataloc.Dir}" target="import-build-number" inheritAll="false">
455
                        <property name="buildNumberFile" location="build.number"/>
456
                </ant>                
457
                <ant dir="${dataloc.Dir}" target="batch-build" inheritAll="false">
458
                        <property name="debug" value="${debug}"/>
459
                        <property name="debuglevel" value="${debuglevel}"/>
460
                        <property name="encoding" value="${encoding}"/>
461
                        <property name="projectName" value="${dataloc}" />
462
                </ant>
463
                <condition property="geoprocessing.Dir" value="${geoprocessing}" else="scripts/voidTarget">
464
                        <available file="${geoprocessing}" type="dir"/>
465
                </condition>
466
                <ant dir="${geoprocessing.Dir}" target="import-build-number" inheritAll="false">
467
                        <property name="buildNumberFile" location="build.number"/>
468
                </ant>
469
                <ant dir="${geoprocessing.Dir}" target="batch-build" inheritAll="false">
470
                        <property name="debug" value="${debug}"/>
471
                        <property name="debuglevel" value="${debuglevel}"/>
472
                        <property name="encoding" value="${encoding}"/>
473
                        <property name="projectName" value="${geoprocessing}" />
474
                </ant>
475
                <condition property="geoprocessingExtensions.Dir" value="${geoprocessingExtensions}" else="scripts/voidTarget">
476
                        <available file="${geoprocessingExtensions}" type="dir"/>
477
                </condition>
478
                <ant dir="${geoprocessingExtensions.Dir}" target="import-build-number" inheritAll="false">
479
                        <property name="buildNumberFile" location="build.number"/>
480
                </ant>                
481
                <ant dir="${geoprocessingExtensions.Dir}" target="batch-build" inheritAll="false">
482
                        <property name="debug" value="${debug}"/>
483
                        <property name="debuglevel" value="${debuglevel}"/>
484
                        <property name="encoding" value="${encoding}"/>
485
                        <property name="projectName" value="${geoprocessingExtensions}" />
486
                </ant>
487
                <condition property="georeferencing.Dir" value="${georeferencing}" else="scripts/voidTarget">
488
                        <and>
489
                                <available file="${georeferencing}" type="dir"/>
490
                                <available file="${raster-se}" type="dir"/> <!-- necessary to compile georeferencing -->
491
                        </and>
492
                </condition>
493
                <ant dir="${georeferencing.Dir}" target="import-build-number" inheritAll="false">
494
                        <property name="buildNumberFile" location="build.number"/>
495
                </ant>
496
                <ant dir="${georeferencing.Dir}" target="batch-build" inheritAll="false">
497
                        <property name="debug" value="${debug}"/>
498
                        <property name="debuglevel" value="${debuglevel}"/>
499
                        <property name="encoding" value="${encoding}"/>
500
                        <property name="projectName" value="${georeferencing}" />
501
                </ant>
502
                <condition property="wfs.Dir" value="${wfs}" else="scripts/voidTarget">
503
                        <available file="${wfs}" type="dir"/>
504
                </condition>
505
                <ant dir="${wfs.Dir}" target="import-build-number" inheritAll="false">
506
                        <property name="buildNumberFile" location="build.number"/>
507
                </ant>                
508
                <ant dir="${wfs.Dir}" target="batch-build" inheritAll="false">
509
                        <property name="debug" value="${debug}"/>
510
                        <property name="debuglevel" value="${debuglevel}"/>
511
                        <property name="encoding" value="${encoding}"/>
512
                        <property name="projectName" value="${wfs}" />
513
                </ant>
514
                <condition property="centerview.Dir" value="${centerview}" else="scripts/voidTarget">
515
                        <available file="${centerview}" type="dir"/>
516
                </condition>
517
                <ant dir="${centerview.Dir}" target="import-build-number" inheritAll="false">
518
                        <property name="buildNumberFile" location="build.number"/>
519
                </ant>                
520
                <ant dir="${centerview.Dir}" target="batch-build" inheritAll="false">
521
                        <property name="debug" value="${debug}"/>
522
                        <property name="debuglevel" value="${debuglevel}"/>
523
                        <property name="encoding" value="${encoding}"/>
524
                        <property name="installBaseDir" value="${global.installBaseDir}"/>
525
                        <property name="projectName" value="${centerview}" />
526
                </ant>
527
                <condition property="scripting.Dir" value="${scripting}" else="scripts/voidTarget">
528
                        <available file="${scripting}" type="dir"/>
529
                </condition>
530
                <ant dir="${scripting.Dir}" target="import-build-number" inheritAll="false">
531
                        <property name="buildNumberFile" location="build.number"/>
532
                </ant>                
533
                <ant dir="${scripting.Dir}" target="batch-build" inheritAll="false">
534
                        <property name="debug" value="${debug}"/>
535
                        <property name="debuglevel" value="${debuglevel}"/>
536
                        <property name="encoding" value="${encoding}"/>
537
                        <property name="projectName" value="${scripting}" />
538
                </ant>
539
        </target>
540
        
541
        <target name="clean-all"
542
                                depends="clean-base,clean-extensions"
543
                                description="clean up" />
544
        
545
        <target name="clean-base"
546
                description="cleans the base components of gvSIG: appgvSIG + libs">
547
                <!-- Delete the ${build} and ${dist} directory trees -->
548
                <condition property="utiles.Dir" value="${utiles}" else="scripts/voidTarget">
549
                        <available file="${utiles}" type="dir"/>
550
                </condition>
551
                <ant dir="${utiles.Dir}" target="clean">
552
                        <property name="projectName" value="${utiles}" />
553
                </ant>
554
        
555
                <condition property="i18n.Dir" value="${i18n}" else="scripts/voidTarget">
556
                        <available file="${i18n}" type="dir"/>
557
                </condition>
558
                <ant dir="${i18n.Dir}" target="clean">
559
                        <property name="projectName" value="${i18n}" />
560
                </ant>
561
                <condition property="exceptions.Dir" value="${exceptions}" else="scripts/voidTarget">
562
                        <available file="${exceptions}" type="dir"/>
563
                </condition>
564
                <ant dir="${exceptions.Dir}" target="clean">
565
                        <property name="projectName" value="${exceptions}" />
566
                </ant>
567
        
568
                <ant dir="${andami}" target="clean"/>
569
                <ant dir="${core}" target="clean"/>
570
        
571
                <condition property="cms.Dir" value="${cms}" else="scripts/voidTarget">
572
                        <available file="${cms}" type="dir"/>
573
                </condition>
574
                <ant dir="${cms.Dir}" target="clean">
575
                        <property name="projectName" value="${cms}" />
576
                </ant>
577
        
578
                <condition property="driver.Dir" value="${driver}" else="scripts/voidTarget">
579
                        <available file="${driver}" type="dir"/>
580
                </condition>
581
                <ant dir="${driver.Dir}" target="clean">
582
                        <property name="projectName" value="${driver}" />
583
                </ant>
584
        
585
                <condition property="remote.Dir" value="${remote}" else="scripts/voidTarget">
586
                        <available file="${remote}" type="dir"/>
587
                </condition>
588
                <ant dir="${remote.Dir}" target="clean">
589
                        <property name="projectName" value="${remote}" />
590
                </ant>
591
        
592
                <ant dir="${gdbms}" target="clean" />
593
                <ant dir="${fmap}" target="clean"/>
594
                <ant dir="${gvSIG}" target="clean"/>
595
        
596
                <condition property="libui.Dir" value="${libui}" else="scripts/voidTarget">
597
                        <available file="${libui}" type="dir"/>
598
                </condition>
599
                <ant dir="${libui.Dir}" target="clean">
600
                        <property name="projectName" value="${libui}" />
601
                </ant>
602
        </target>
603
        
604
        <target name="clean-extensions"
605
                description="Clean the extensions">
606
                <condition property="event.Dir" value="${event}" else="scripts/voidTarget">
607
                        <available file="${event}" type="dir"/>
608
                </condition>
609
                <ant dir="${event.Dir}" target="clean" inheritAll="false">
610
                        <property name="projectName" value="${event}" />
611
                </ant>
612
        
613
                <condition property="libdwg.Dir" value="${libdwg}" else="scripts/voidTarget">
614
                        <available file="${libdwg}" type="dir"/>
615
                </condition>
616
                <ant dir="${libdwg.Dir}" target="clean" inheritAll="false">
617
                        <property name="projectName" value="${libdwg}" />
618
                </ant>
619

    
620
                <condition property="extdwg.Dir" value="${extdwg}" else="scripts/voidTarget">
621
                        <available file="${extdwg}" type="dir"/>
622
                </condition>
623
                <ant dir="${extdwg.Dir}" target="clean" inheritAll="false">
624
                        <property name="projectName" value="${extdwg}" />
625
                </ant>
626

    
627
                <condition property="jdbc.Dir" value="${jdbc}" else="scripts/voidTarget">
628
                        <available file="${jdbc}" type="dir"/>
629
                </condition>                
630
                <ant dir="${jdbc.Dir}" target="clean" inheritAll="false">
631
                        <property name="projectName" value="${jdbc}" />
632
                </ant>
633
        
634
                <condition property="cad.Dir" value="${cad}" else="scripts/voidTarget">
635
                        <available file="${cad}" type="dir"/>
636
                </condition>
637
                <ant dir="${cad.Dir}" target="clean" inheritAll="false">
638
                        <property name="projectName" value="${cad}" />
639
                </ant>
640
        
641
                <condition property="appcatalog.Dir" value="${appcatalog}" else="scripts/voidTarget">
642
                        <available file="${appcatalog}" type="dir"/>
643
                </condition>
644
                <ant dir="${appcatalog.Dir}" target="clean" inheritAll="false">
645
                        <property name="projectName" value="${appcatalog}" />
646
                </ant>
647
        
648
                <condition property="catalog.Dir" value="${catalog}" else="scripts/voidTarget">
649
                        <available file="${catalog}" type="dir"/>
650
                </condition>
651
                <ant dir="${catalog.Dir}" target="clean" inheritAll="false">
652
                        <property name="projectName" value="${catalog}" />
653
                </ant>
654
        
655
                <condition property="wcs.Dir" value="${wcs}" else="scripts/voidTarget">
656
                        <available file="${wcs}" type="dir"/>
657
                </condition>
658
                <ant dir="${wcs.Dir}" target="clean" inheritAll="false">
659
                        <property name="projectName" value="${wcs}" />
660
                </ant>
661
        
662
                <condition property="wms.Dir" value="${wms}" else="scripts/voidTarget">
663
                        <available file="${wms}" type="dir"/>
664
                </condition>
665
                <ant dir="${wms.Dir}" target="clean" inheritAll="false">
666
                        <property name="projectName" value="${wms}" />
667
                </ant>
668
        
669
                <condition property="dataloc.Dir" value="${dataloc}" else="scripts/voidTarget">
670
                        <available file="${dataloc}" type="dir"/>
671
                </condition>
672
                <ant dir="${dataloc}" target="clean" inheritAll="false">
673
                        <property name="projectName" value="${dataloc}" />
674
                </ant>
675
        
676
                <condition property="geoprocessing.Dir" value="${geoprocessing}" else="scripts/voidTarget">
677
                        <available file="${geoprocessing}" type="dir"/>
678
                </condition>
679
                <ant dir="${geoprocessing.Dir}" target="clean" inheritAll="false">
680
                        <property name="projectName" value="${geoprocessing}" />
681
                </ant>
682
        
683
                <condition property="geoprocessingExtensions.Dir" value="${geoprocessingExtensions}" else="scripts/voidTarget">
684
                        <available file="${geoprocessingExtensions}" type="dir"/>
685
                </condition>
686
                <ant dir="${geoprocessingExtensions}" target="clean" inheritAll="false">
687
                        <property name="projectName" value="${geoprocessingExtensions}" />
688
                </ant>
689
        
690
                <condition property="georeferencing.Dir" value="${georeferencing}" else="scripts/voidTarget">
691
                        <available file="${georeferencing}" type="dir"/>
692
                </condition>
693
                <ant dir="${georeferencing.Dir}" target="clean" inheritAll="false">
694
                        <property name="projectName" value="${georeferencing}" />
695
                </ant>
696
        
697
                <condition property="rastertools.Dir" value="${rastertools}" else="scripts/voidTarget">
698
                        <available file="${rastertools}" type="dir"/>
699
                </condition>
700
                <ant dir="${rastertools.Dir}" target="clean" inheritAll="false">
701
                        <property name="projectName" value="${rastertools}" />
702
                </ant>
703
        
704
                <condition property="wfsg.Dir" value="${wfs}" else="scripts/voidTarget">
705
                        <available file="${wfs}" type="dir"/>
706
                </condition>
707
                <ant dir="${wfsg.Dir}" target="clean" inheritAll="false">
708
                        <property name="projectName" value="${wfs}" />
709
                </ant>
710
        
711
                <condition property="scripting.Dir" value="${scripting}" else="scripts/voidTarget">
712
                        <available file="${scripting}" type="dir"/>
713
                </condition>
714
                <ant dir="${scripting.Dir}" target="clean" inheritAll="false">
715
                        <property name="projectName" value="${scripting}" />
716
                </ant>
717
        
718
                <condition property="centerview.Dir" value="${centerview}" else="scripts/voidTarget">
719
                        <available file="${centerview}" type="dir"/>
720
                </condition>
721
                <ant dir="${centerview.Dir}" target="clean" inheritAll="false">
722
                        <property name="projectName" value="${centerview}" />
723
                </ant>
724
        </target>
725

    
726
        <!-- Those targets don't compile, they just generate the jars and copy files to
727
        andami. The compilation is supposed to be done by Eclipse  -->
728
        <target name="install-all"
729
                                        depends="install-base,install-extensions"
730
                                        description="Generate jars and copy files to Andami for the whole application (gvSIG+libs+extensions). Compilation is supposed to be automatically done by Eclipse" />
731
                
732
        <target name="install-base"
733
                                description="Generate jars and copy files to Andami for the application (gvSIG+libs). Compilation is supposed to be automatically done by Eclipse" >
734
                <ant dir="${utiles}" inheritAll="false" />
735
                <ant dir="${i18n}" inheritAll="false" />
736
                <ant dir="${andami}" inheritAll="false" />
737
                <ant dir="${core}" inheritAll="false" />
738
                <ant dir="${cms}" inheritAll="false" />
739
                <ant dir="${driver}" inheritAll="false" />
740
                <ant dir="${remote}" inheritAll="false" />
741
                <ant dir="${gdbms}" inheritAll="false" />
742
                <ant dir="${fmap}" inheritAll="false" />
743
                <ant dir="${gvSIG}" inheritAll="false" />
744
                <!--                <ant dir="${libui}" inheritAll="false" /> -->
745
        </target>
746
                
747
        <target name="install-extensions" depends="base"
748
                        description="Generate jars and copy files to Andami for the extensions. Compilation is supposed to be automatically done by Eclipse" >
749
                <ant dir="${event}" inheritAll="false" />
750
                <ant dir="${libdwg}" inheritAll="false" />
751
                <ant dir="${extdwg}" inheritAll="false" />
752
                <ant dir="${jdbc}" inheritAll="false" />
753
                <ant dir="${cad}" inheritAll="false" />
754
                <ant dir="${appcatalog}" inheritAll="false" />
755
                <ant dir="${catalog}" inheritAll="false" />
756
                <ant dir="${wcs}" inheritAll="false" />
757
                <ant dir="${wms}" inheritAll="false" />
758
                <ant dir="${dataloc}" inheritAll="false" />
759
                <ant dir="${geoprocessing}" inheritAll="false" />
760
                <ant dir="${georeferencing}" inheritAll="false" />
761
                <ant dir="${rastertools}" inheritAll="false" />
762
                <ant dir="${wfs}" inheritAll="false" />
763
                <ant dir="${scripting}" inheritAll="false" />
764
                <ant dir="${centerview}" inheritAll="false" />        
765
        </target>
766

    
767
        
768
        
769
        <!-- The download targets are still no working well (or maybe not working at all...) -->
770
        <target name="download"
771
                        description="Not working yet. Downloads all the projects from the CVS HEAD"
772
                        depends="download-base, download-extensions">
773
        </target>
774

    
775
        <target name="download-base" description="Not working yet. It will download the base projects required to build gvSIG">
776
                <property name="downloadDir" value="tmp-download"/>
777
                <mkdir dir="${downloadDir}" />
778
                
779
                <!-- andami -->
780
                <cvs
781
                        dest="${downloadDir}"
782
                        package="gvSIG-project/frameworks/_fwAndami"
783
                        cvsRoot=":extssh:www.gvsig.org:/var/lib/cvs-gvSIG" />
784

    
785
                <move todir="${andami}">
786
                        <fileset dir="${downloadDir}/gvSIG-project/frameworks/_fwAndami"/>
787
                </move>
788
                
789
                <!-- we have to do the same for the rest of the projects -->
790
        </target>
791
        
792
        <target name="download-extensions" description="Not working yet. It will download the extensions">
793
        </target>
794
        
795
        
796
        
797
        <!-- ***********  Unused targets. Should we remove them? ********* -->
798
        
799
          <target name="makeZip"
800
                  description="Genera un zip con todo lo necesario para ejecutar gvSIG. Actualmente no se usa"
801
                  depends="dist">
802
            <!-- Create the distribution directory -->
803
            <mkdir dir="${dist}/${zipName}"/>
804
            <jar jarfile="${dist}/${zipName}/gvSIG.jar" basedir="../mdiApp/bin" manifest="../mdiApp/manifest.mf"/>
805
            <jar jarfile="${dist}/${zipName}/gvSIG.jar" basedir="../mdiApp/" includes="images/*" update="true"/>
806
            <jar jarfile="${dist}/${zipName}/gvSIG.jar" basedir="../mdiApp/" includes="plugin.dtd" update="true"/>
807
            <copy todir="${dist}/${zipName}">
808
                        <fileset dir="../mdiApp">
809
                                <include name="extensiones/${plugin}/**"/>
810
                                <include name="extensiones/plugin.*"/>
811
                                <include name="plugin.*"/>
812
                        </fileset>
813
                        <!-- fileset dir="${dist}" includes="gvSIG.jar"/ -->
814
                        <fileset dir="../mdiApp_v02_estable">
815
                                <include name="lib/**"/>
816
                        </fileset>
817
                        <fileset dir="distFiles" includes="**/**"/>
818
            </copy>
819
                <zip zipfile="${zipName}.zip">
820
                        <fileset dir="${dist}">
821
                                <include name="**/**"/>
822
                        </fileset>
823
                </zip>
824
         <!--   <delete dir="${dist}"/> -->
825
          </target>
826
</project>
827