Statistics
| Revision:

root / trunk / applications / appgvSIG / build.xml @ 12272

History | View | Annotate | Download (32.2 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="fmap" location="../libFMap"/>
141
        <property name="gvSIG" location="../appgvSIG"/>
142
        <property name="remote" location="../libRemoteServices"/>
143
        <property name="gdbms" location="../libGDBMS"/>
144
        <property name="i18n" location="../libInternationalization"/>
145
        <property name="global.installBaseDir" location="${andami}"/>
146
        <property name="exceptions" location="../libExceptions"/>
147

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

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

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

    
583
                <condition property="extdwg.Dir" value="${extdwg}" else="scripts/voidTarget">
584
                        <available file="${extdwg}" type="dir"/>
585
                </condition>
586
                <ant dir="${extdwg.Dir}" target="clean" inheritAll="false">
587
                        <property name="projectName" value="${extdwg}" />
588
                </ant>
589

    
590
                <condition property="jdbc.Dir" value="${jdbc}" else="scripts/voidTarget">
591
                        <available file="${jdbc}" type="dir"/>
592
                </condition>                
593
                <ant dir="${jdbc.Dir}" target="clean" inheritAll="false">
594
                        <property name="projectName" value="${jdbc}" />
595
                </ant>
596
        
597
                <condition property="cad.Dir" value="${cad}" else="scripts/voidTarget">
598
                        <available file="${cad}" type="dir"/>
599
                </condition>
600
                <ant dir="${cad.Dir}" target="clean" inheritAll="false">
601
                        <property name="projectName" value="${cad}" />
602
                </ant>
603
        
604
                <condition property="appcatalog.Dir" value="${appcatalog}" else="scripts/voidTarget">
605
                        <available file="${appcatalog}" type="dir"/>
606
                </condition>
607
                <ant dir="${appcatalog.Dir}" target="clean" inheritAll="false">
608
                        <property name="projectName" value="${appcatalog}" />
609
                </ant>
610
        
611
                <condition property="catalog.Dir" value="${catalog}" else="scripts/voidTarget">
612
                        <available file="${catalog}" type="dir"/>
613
                </condition>
614
                <ant dir="${catalog.Dir}" target="clean" inheritAll="false">
615
                        <property name="projectName" value="${catalog}" />
616
                </ant>
617
        
618
                <condition property="wcs.Dir" value="${wcs}" else="scripts/voidTarget">
619
                        <available file="${wcs}" type="dir"/>
620
                </condition>
621
                <ant dir="${wcs.Dir}" target="clean" inheritAll="false">
622
                        <property name="projectName" value="${wcs}" />
623
                </ant>
624
        
625
                <condition property="wms.Dir" value="${wms}" else="scripts/voidTarget">
626
                        <available file="${wms}" type="dir"/>
627
                </condition>
628
                <ant dir="${wms.Dir}" target="clean" inheritAll="false">
629
                        <property name="projectName" value="${wms}" />
630
                </ant>
631
        
632
                <condition property="dataloc.Dir" value="${dataloc}" else="scripts/voidTarget">
633
                        <available file="${dataloc}" type="dir"/>
634
                </condition>
635
                <ant dir="${dataloc}" target="clean" inheritAll="false">
636
                        <property name="projectName" value="${dataloc}" />
637
                </ant>
638
        
639
                <condition property="geoprocessing.Dir" value="${geoprocessing}" else="scripts/voidTarget">
640
                        <available file="${geoprocessing}" type="dir"/>
641
                </condition>
642
                <ant dir="${geoprocessing.Dir}" target="clean" inheritAll="false">
643
                        <property name="projectName" value="${geoprocessing}" />
644
                </ant>
645
        
646
                <condition property="geoprocessingExtensions.Dir" value="${geoprocessingExtensions}" else="scripts/voidTarget">
647
                        <available file="${geoprocessingExtensions}" type="dir"/>
648
                </condition>
649
                <ant dir="${geoprocessingExtensions}" target="clean" inheritAll="false">
650
                        <property name="projectName" value="${geoprocessingExtensions}" />
651
                </ant>
652
        
653
                <condition property="georeferencing.Dir" value="${georeferencing}" else="scripts/voidTarget">
654
                        <available file="${georeferencing}" type="dir"/>
655
                </condition>
656
                <ant dir="${georeferencing.Dir}" target="clean" inheritAll="false">
657
                        <property name="projectName" value="${georeferencing}" />
658
                </ant>
659
        
660
                <condition property="rastertools.Dir" value="${rastertools}" else="scripts/voidTarget">
661
                        <available file="${rastertools}" type="dir"/>
662
                </condition>
663
                <ant dir="${rastertools.Dir}" target="clean" inheritAll="false">
664
                        <property name="projectName" value="${rastertools}" />
665
                </ant>
666
        
667
                <condition property="wfsg.Dir" value="${wfs}" else="scripts/voidTarget">
668
                        <available file="${wfs}" type="dir"/>
669
                </condition>
670
                <ant dir="${wfsg.Dir}" target="clean" inheritAll="false">
671
                        <property name="projectName" value="${wfs}" />
672
                </ant>
673
        
674
                <condition property="scripting.Dir" value="${scripting}" else="scripts/voidTarget">
675
                        <available file="${scripting}" type="dir"/>
676
                </condition>
677
                <ant dir="${scripting.Dir}" target="clean" inheritAll="false">
678
                        <property name="projectName" value="${scripting}" />
679
                </ant>
680
        
681
                <condition property="centerview.Dir" value="${centerview}" else="scripts/voidTarget">
682
                        <available file="${centerview}" type="dir"/>
683
                </condition>
684
                <ant dir="${centerview.Dir}" target="clean" inheritAll="false">
685
                        <property name="projectName" value="${centerview}" />
686
                </ant>
687
        </target>
688

    
689
        <!-- Those targets don't compile, they just generate the jars and copy files to
690
        andami. The compilation is supposed to be done by Eclipse  -->
691
        <target name="install-all"
692
                                        depends="install-base,install-extensions"
693
                                        description="Generate jars and copy files to Andami for the whole application (gvSIG+libs+extensions). Compilation is supposed to be automatically done by Eclipse" />
694
                
695
        <target name="install-base"
696
                                description="Generate jars and copy files to Andami for the application (gvSIG+libs). Compilation is supposed to be automatically done by Eclipse" >
697
                <ant dir="${utiles}" inheritAll="false" />
698
                <ant dir="${i18n}" inheritAll="false" />
699
                <ant dir="${andami}" inheritAll="false" />
700
                <ant dir="${core}" inheritAll="false" />
701
                <ant dir="${cms}" inheritAll="false" />
702
                <ant dir="${driver}" inheritAll="false" />
703
                <ant dir="${remote}" inheritAll="false" />
704
                <ant dir="${gdbms}" inheritAll="false" />
705
                <ant dir="${fmap}" inheritAll="false" />
706
                <ant dir="${gvSIG}" inheritAll="false" />
707
                <!--                <ant dir="${libui}" inheritAll="false" /> -->
708
        </target>
709
                
710
        <target name="install-extensions" depends="base"
711
                        description="Generate jars and copy files to Andami for the extensions. Compilation is supposed to be automatically done by Eclipse" >
712
                <ant dir="${event}" inheritAll="false" />
713
                <ant dir="${libdwg}" inheritAll="false" />
714
                <ant dir="${extdwg}" inheritAll="false" />
715
                <ant dir="${jdbc}" inheritAll="false" />
716
                <ant dir="${cad}" inheritAll="false" />
717
                <ant dir="${appcatalog}" inheritAll="false" />
718
                <ant dir="${catalog}" inheritAll="false" />
719
                <ant dir="${wcs}" inheritAll="false" />
720
                <ant dir="${wms}" inheritAll="false" />
721
                <ant dir="${dataloc}" inheritAll="false" />
722
                <ant dir="${geoprocessing}" inheritAll="false" />
723
                <ant dir="${georeferencing}" inheritAll="false" />
724
                <ant dir="${rastertools}" inheritAll="false" />
725
                <ant dir="${wfs}" inheritAll="false" />
726
                <ant dir="${scripting}" inheritAll="false" />
727
                <ant dir="${centerview}" inheritAll="false" />        
728
        </target>
729

    
730
        
731
        
732
        <!-- The download targets are still no working well (or maybe not working at all...) -->
733
        <target name="download"
734
                        description="Not working yet. Downloads all the projects from the CVS HEAD"
735
                        depends="download-base, download-extensions">
736
        </target>
737

    
738
        <target name="download-base" description="Not working yet. It will download the base projects required to build gvSIG">
739
                <property name="downloadDir" value="tmp-download"/>
740
                <mkdir dir="${downloadDir}" />
741
                
742
                <!-- andami -->
743
                <cvs
744
                        dest="${downloadDir}"
745
                        package="gvSIG-project/frameworks/_fwAndami"
746
                        cvsRoot=":extssh:www.gvsig.org:/var/lib/cvs-gvSIG" />
747

    
748
                <move todir="${andami}">
749
                        <fileset dir="${downloadDir}/gvSIG-project/frameworks/_fwAndami"/>
750
                </move>
751
                
752
                <!-- we have to do the same for the rest of the projects -->
753
        </target>
754
        
755
        <target name="download-extensions" description="Not working yet. It will download the extensions">
756
        </target>
757
        
758
        
759
        
760
        <!-- ***********  Unused targets. Should we remove them? ********* -->
761
        
762
          <target name="makeZip"
763
                  description="Genera un zip con todo lo necesario para ejecutar gvSIG. Actualmente no se usa"
764
                  depends="dist">
765
            <!-- Create the distribution directory -->
766
            <mkdir dir="${dist}/${zipName}"/>
767
            <jar jarfile="${dist}/${zipName}/gvSIG.jar" basedir="../mdiApp/bin" manifest="../mdiApp/manifest.mf"/>
768
            <jar jarfile="${dist}/${zipName}/gvSIG.jar" basedir="../mdiApp/" includes="images/*" update="true"/>
769
            <jar jarfile="${dist}/${zipName}/gvSIG.jar" basedir="../mdiApp/" includes="plugin.dtd" update="true"/>
770
            <copy todir="${dist}/${zipName}">
771
                        <fileset dir="../mdiApp">
772
                                <include name="extensiones/${plugin}/**"/>
773
                                <include name="extensiones/plugin.*"/>
774
                                <include name="plugin.*"/>
775
                        </fileset>
776
                        <!-- fileset dir="${dist}" includes="gvSIG.jar"/ -->
777
                        <fileset dir="../mdiApp_v02_estable">
778
                                <include name="lib/**"/>
779
                        </fileset>
780
                        <fileset dir="distFiles" includes="**/**"/>
781
            </copy>
782
                <zip zipfile="${zipName}.zip">
783
                        <fileset dir="${dist}">
784
                                <include name="**/**"/>
785
                        </fileset>
786
                </zip>
787
         <!--   <delete dir="${dist}"/> -->
788
          </target>
789
</project>
790