Statistics
| Revision:

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

History | View | Annotate | Download (18.4 KB)

1
<project name="Generar extension en MDIAPP" 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.0 beta ${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
        <property name="build-doc" value="build-doc"/>
21
        <property name="compile-classpath" value="${lib}/batik-awt-util.jar:${lib}/batik-bridge.jar:${lib}/batik-css.jar:${lib}/batik-dom.jar:${lib}/batik-ext.jar:${lib}/batik-extension.jar:${lib}/batik-gui-util.jar:${lib}/batik-gvt.jar:${lib}/batik-parser.jar:${lib}/batik-script.jar:${lib}/batik-svg-dom.jar:${lib}/batik-svggen.jar:${lib}/batik-swing.jar:${lib}/batik-transcoder.jar:${lib}/batik-util.jar:${lib}/batik-xml.jar:${andamiLibs}/beans.jar:${andamiLibs}/castor-0.9.5.3-xml.jar:${fmapLibs}/cms.jar:${fmapLibs}/driver-manager-1.1.jar:${fmapLibs}/fmap.jar:${fmapLibs}/geoapi-2.0.jar:${fmapLibs}/gdbms-0.8-SNAPSHOT.jar:${fmapLibs}/gt2-legacy.jar:${fmapLibs}/gt2-main.jar:${fmapLibs}/gt2-postgis.jar:${fmapLibs}/gt2-wfs.jar:${fmapLibs}/gt2-wms.jar:${lib}/itext-1.4.2.jar:${fmapLibs}/jecw-0.0.1.jar:${lib-fmap}/jecwcompress-0.0.0.jar:${andamiJar}:${lib}/jep-2.24.jar:${lib-fmap}/jgdal-0.1.0.jar:${lib}/JimiProClasses.zip:${fmapLibs}/jogr.jar:${fmapLibs}/jts-1.7.jar:${lib}/junit.jar:${lib}/JWizardComponent.jar:${andamiLibs}/iver-utiles.jar:${andamiLibs}/log4j-1.2.8.jar:${andamiLibs}/looks-2.0.2.jar:${lib}/js.jar:${lib}/pdf-transcoder.jar:${lib-fmap}/units-0.01.jar:${lib-fmap}/wmsclient.jar:${lib}/xml-apis.jar:"/>
22
                
23
        <target name="init">
24
                <!-- Create the time stamp -->
25
                <tstamp/>
26
                <!-- Create the build directory structure used by compile -->
27
                <mkdir dir="${build}"/>
28
                <!-- Creamos un fichero con el timeStamp para que lo lea el FPanelAbout -->
29
                <!-- <buildnumber/> -->
30
        </target>
31

    
32
        <target name="build-doc" depends="" description="Genera un zip con la documentación">
33
                <javadoc
34
                        packagenames="com.iver.cit.gvsig.*"
35
                        sourcepath="src"
36
                        defaultexcludes="yes"
37
                        destdir="${build-doc}/gvSIG-api"
38
                        windowtitle="gvSIG API">
39
                </javadoc>
40
        </target>
41

    
42
        <target name="dist"
43
                                depends="init"
44
                                description="generate the distribution" >
45
                <!-- Create the distribution directory -->
46
                <mkdir dir="${dist}"/>
47

    
48
                <!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file -->
49
                <copy todir="${dist}/lib">
50
                        <fileset dir="./lib" includes="*.jar,*.zip"/>
51
                </copy>
52
                <copy todir="${dist}/lib">
53
                        <fileset dir="${fmapdir}/lib" includes="*.jar"/>
54
                </copy>
55
                <jar jarfile="${dist}/lib/fmap.jar" basedir="${fmapdir}/bin"/>
56
                <jar jarfile="${dist}/lib/${plugin}.jar" basedir="${build}"/>
57
                <copy file="config/config.xml" todir="${dist}"/>
58
                <copy file="config/about.htm" todir="${dist}"/>
59
                <copy file="build.number" todir="${dist}"/>
60
                <copy todir="${dist}">
61
                        <fileset dir="config" includes="text*.properties"/>
62
                </copy>
63
                <copy todir="${dist}/images">
64
                        <fileset dir="images/" includes="*"/>
65
                </copy>
66
                <copy todir="${dist}/northimages">
67
                        <fileset dir="northimages/" includes="*"/>
68
                </copy>
69

    
70
                <move todir="${extensionDir}/${plugin}/">
71
                        <fileset dir="${dist}" includes="**/**"/>
72
                </move>
73
        </target>
74

    
75
  <target name="makeZip"
76
          description="Genera un zip con todo lo necesario para ejecutar gvSIG"
77
          depends="dist">
78
    <!-- Create the distribution directory -->
79
    <mkdir dir="${dist}/${zipName}"/>
80
    <jar jarfile="${dist}/${zipName}/gvSIG.jar" basedir="../mdiApp/bin" manifest="../mdiApp/manifest.mf"/>
81
    <jar jarfile="${dist}/${zipName}/gvSIG.jar" basedir="../mdiApp/" includes="images/*" update="true"/>
82
    <jar jarfile="${dist}/${zipName}/gvSIG.jar" basedir="../mdiApp/" includes="plugin.dtd" update="true"/>
83
    <copy todir="${dist}/${zipName}">
84
                <fileset dir="../mdiApp">
85
                        <include name="extensiones/${plugin}/**"/>
86
                        <include name="extensiones/plugin.*"/>
87
                        <include name="plugin.*"/>
88
                </fileset>
89
                <!-- fileset dir="${dist}" includes="gvSIG.jar"/ -->
90
                <fileset dir="../mdiApp_v02_estable">
91
                        <include name="lib/**"/>
92
                </fileset>
93
                <fileset dir="distFiles" includes="**/**"/>
94
    </copy>
95
        <zip zipfile="${zipName}.zip">
96
                <fileset dir="${dist}">
97
                        <include name="**/**"/>
98
                </fileset>
99
        </zip>
100
    <delete dir="${dist}"/>
101
  </target>
102
        
103
        <target name="batch-build"
104
                        description="compile the sources, create the jar file"
105
                        depends="get-fmap-libs,compile,create-jar,copy-libs,copy-data-files,move-to-andami">
106
        </target>
107
        
108
        <target name="compile" description="compile the source">
109
                <!-- Create the time stamp -->
110
                <tstamp/>
111
                <!-- Create the build directory structure used by compile -->
112
                <mkdir dir="${build}"/>
113
                <!-- Creamos un fichero con el timeStamp para que lo lea el FPanelAbout -->
114
                <buildnumber />
115
                <!-- Compile the Java code from ${src} to ${build} -->
116
                <javac  srcdir="${src}"
117
                        destdir="${build}"
118
                        source="1.4"
119
                        target="1.4"
120
                        debug="${debug}"
121
                        debuglevel="${debuglevel}"
122
                        classpath="${compile-classpath}"
123
                        excludes="com/iver/cit/gvsig/test/**"/>
124
        </target>        
125

    
126
        <target name="create-jar" description="Creates the jar file">
127
                <mkdir dir="${dist}/lib"/>
128
                <jar jarfile="${dist}/lib/${plugin}.jar" basedir="${build}"/>
129
        </target>
130
        
131
        <target name="copy-libs"
132
                depends="get-fmap-libs">
133
                <mkdir dir="${dist}"/>
134
                <!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file -->
135
                <copy todir="${dist}/lib">
136
                        <fileset dir="./lib" includes="*.jar,*.zip"/>
137
                </copy>
138
        </target>
139
        
140
        <target name="get-fmap-libs">
141
                <copy todir="${dist}/lib">
142
                        <fileset dir="${fmapdir}/lib" includes="*.jar"/>
143
                </copy>
144
                <jar jarfile="${dist}/lib/fmap.jar" basedir="${fmapdir}/bin"/>
145
                <copy file="${dist}/lib/fmap.jar" todir="${extensionDir}/${plugin}/lib"/>
146
        </target>
147
        
148
        <target name="copy-data-files">
149
        <copy todir="${dist}">
150
                <fileset dir="config" includes="*" />
151
        </copy>
152
                <copy file="build.number" todir="${dist}"/>
153
                <copy todir="${dist}/images">
154
                        <fileset dir="images/" includes="*"/>
155
                </copy>
156
                <copy todir="${dist}/northimages">
157
                        <fileset dir="northimages/" includes="*"/>
158
                </copy>
159
    </target>
160
        
161
        <target name="move-to-andami" description="Moves the build directory to andami">
162
                <move todir="${extensionDir}/${plugin}/">
163
                        <fileset dir="${dist}" includes="**/**"/>
164
                </move>
165
        </target>
166

    
167
        <target name="clean"
168
                        description="clean up" >
169
                <!-- Delete the ${build} and ${dist} directory trees -->
170
                <delete dir="${build}"/>
171
                <delete dir="${dist}"/>
172
        </target>
173
        
174
        
175
        <!-- the global build starts here -->
176
        <property name="andami" location="../_fwAndami"/>
177
        <property name="utiles" location="../libIverUtiles"/>
178
        <property name="core" location="../libCorePlugin"/>
179
        <property name="driver" location="../libDriverManager"/>
180
        <property name="cms" location="../libCq CMS for java"/>
181
        <property name="fmap" location="../libFMap"/>
182
        <property name="gvSIG" location="../appgvSIG"/>
183
        <property name="remote" location="../libRemoteServices"/>
184
        <property name="gdbms" location="../libGDBMS"/>
185
        <property name="i18n" location="../libInternationalization"/>
186
        <property name="appcatalog" location="../appCatalogYNomenclatorClient"/>
187
        <property name="catalog" location="../extCatalogYNomenclator"/>
188
        <property name="dataloc" location="../extDataLocator"/>
189
        <property name="event" location="../extAddEventTheme"/>
190
        <property name="libdwg" location="../libDwg"/>
191
        <property name="extdwg" location="../extDwg"/>
192
        <property name="cad" location="../extCAD"/>
193
        <property name="geoprocessing" location="../extGeoProcessing"/>
194
        <property name="georeferencing" location="../extGeoreferencing"/>
195
        <property name="jdbc" location="../extJDBC"/>
196
        <property name="rastertools" location="../extRasterTools"/>
197
        <property name="wcs" location="../extWCS"/>
198
        <property name="wfs" location="../extWFS2"/>
199
        <property name="wms" location="../extWMS"/>
200
        <property name="scripting" location="../extScripting"/>
201
        <property name="centerview" location="../extCenterViewToPoint"/>
202
        <property name="libui" location="../libUI"/>
203
        <property name="global.installBaseDir" location="${andami}"/>
204

    
205
        <target name="build-all"
206
                                depends="debug-yes,base,extensions"
207
                                description="Builds the application, including extensions" />
208
        
209
        <target name="eclipse-build-all"
210
                                        depends="debug-no,base,extensions"
211
                                        description="Builds the application, including extensions, producing debug info" />
212
        
213
        <target name="debug-yes">
214
                <property name="debug" value="on"/>
215
                <property name="debuglevel" value="lines, vars"/>
216
        </target>
217
        
218
        <target name="debug-no">
219
                <property name="debug" value="off"/>
220
        </target>
221
        
222
        <target name="base"
223
                        description="Builds the application, excluding extensions">
224
                <ant dir="${utiles}" target="batch-build" inheritAll="false">
225
                        <property name="debug" value="${debug}"/>
226
                        <property name="debuglevel" value="${debuglevel}"/>
227
                        <property name="encoding" value="ISO_8859_1"/>
228
                </ant>
229
                  <ant dir="${i18n}" target="batch-build" inheritAll="false">
230
                        <property name="debug" value="${debug}"/>
231
                        <property name="debuglevel" value="${debuglevel}"/>
232
                        <property name="encoding" value="ISO_8859_1"/>
233
                </ant>
234
                <ant dir="${andami}" target="batch-build"  inheritAll="false">
235
                        <property name="debug" value="${debug}"/>
236
                        <property name="debuglevel" value="${debuglevel}"/>
237
                        <property name="encoding" value="ISO_8859_1"/>
238
                </ant>
239
                <ant dir="${libui}" target="batch-build" inheritAll="false">
240
                        <property name="debug" value="${debug}"/>
241
                        <property name="debuglevel" value="${debuglevel}"/>
242
                        <property name="installBaseDir" value="${global.installBaseDir}"/>
243
                        <property name="encoding" value="ISO_8859_1"/>
244
                </ant>
245
                <ant dir="${core}" target="batch-build"  inheritAll="false">
246
                        <property name="debug" value="${debug}"/>
247
                        <property name="debuglevel" value="${debuglevel}"/>
248
                        <property name="encoding" value="ISO_8859_1"/>
249
                </ant>
250
                <ant dir="${cms}" target="batch-build"  inheritAll="false">
251
                        <property name="debug" value="${debug}"/>
252
                        <property name="debuglevel" value="${debuglevel}"/>
253
                        <property name="encoding" value="ISO_8859_1"/>
254
                </ant>
255
                <ant dir="${driver}" target="batch-build"  inheritAll="false">
256
                        <property name="debug" value="${debug}"/>
257
                        <property name="debuglevel" value="${debuglevel}"/>
258
                        <property name="encoding" value="ISO_8859_1"/>
259
                </ant>
260
                <ant dir="${remote}" target="batch-build"  inheritAll="false">
261
                        <property name="debug" value="${debug}"/>
262
                        <property name="debuglevel" value="${debuglevel}"/>
263
                        <property name="encoding" value="ISO_8859_1"/>
264
                </ant>
265
                <ant dir="${gdbms}" target="batch-build" inheritAll="false">
266
                        <property name="debug" value="${debug}"/>
267
                        <property name="debuglevel" value="${debuglevel}"/>
268
                        <property name="encoding" value="ISO_8859_1"/>
269
                </ant>
270
                <ant dir="${fmap}" target="batch-build"  inheritAll="false">
271
                        <property name="debug" value="${debug}"/>
272
                        <property name="debuglevel" value="${debuglevel}"/>
273
                        <property name="encoding" value="ISO_8859_1"/>
274
                </ant>
275
                <ant dir="${gvSIG}" target="batch-build"  inheritAll="false">
276
                        <property name="debug" value="${debug}"/>
277
                        <property name="debuglevel" value="${debuglevel}"/>
278
                        <property name="encoding" value="ISO_8859_1"/>
279
                </ant>
280
        </target>
281
        
282
        <target name="extensions" depends="base">
283
                <ant dir="${event}" target="batch-build" inheritAll="false">
284
                        <property name="debug" value="${debug}"/>
285
                        <property name="debuglevel" value="${debuglevel}"/>
286
                        <property name="encoding" value="ISO_8859_1"/>
287
                </ant>
288
                <ant dir="${libdwg}" target="batch-build" inheritAll="false">
289
                        <property name="debug" value="${debug}"/>
290
                        <property name="debuglevel" value="${debuglevel}"/>
291
                        <property name="encoding" value="ISO_8859_1"/>
292
                </ant>
293
                <ant dir="${extdwg}" target="batch-build" inheritAll="false">
294
                        <property name="debug" value="${debug}"/>
295
                        <property name="debuglevel" value="${debuglevel}"/>
296
                        <property name="encoding" value="ISO_8859_1"/>
297
                </ant>
298
                <ant dir="${jdbc}" target="batch-build" inheritAll="false">
299
                        <property name="debug" value="${debug}"/>
300
                        <property name="debuglevel" value="${debuglevel}"/>
301
                        <property name="encoding" value="ISO_8859_1"/>
302
                </ant>
303
                <ant dir="${cad}" target="batch-build" inheritAll="false">
304
                        <property name="debug" value="${debug}"/>
305
                        <property name="debuglevel" value="${debuglevel}"/>
306
                        <property name="encoding" value="ISO_8859_1"/>
307
                </ant>
308
                <ant dir="${appcatalog}" target="batch-build" inheritAll="false">
309
                        <property name="debug" value="${debug}"/>
310
                        <property name="debuglevel" value="${debuglevel}"/>
311
                        <property name="encoding" value="ISO_8859_1"/>
312
                </ant>
313
                <ant dir="${catalog}" target="batch-build" inheritAll="false">
314
                        <property name="debug" value="${debug}"/>
315
                        <property name="debuglevel" value="${debuglevel}"/>
316
                        <property name="encoding" value="ISO_8859_1"/>
317
                </ant>
318
                <ant dir="${wcs}" target="batch-build" inheritAll="false">
319
                        <property name="debug" value="${debug}"/>
320
                        <property name="debuglevel" value="${debuglevel}"/>
321
                        <property name="encoding" value="ISO_8859_1"/>
322
                </ant>
323
                <ant dir="${wms}" target="batch-build" inheritAll="false">
324
                        <property name="debug" value="${debug}"/>
325
                        <property name="debuglevel" value="${debuglevel}"/>
326
                        <property name="encoding" value="ISO_8859_1"/>
327
                </ant>
328
                <ant dir="${dataloc}" target="batch-build" inheritAll="false">
329
                        <property name="debug" value="${debug}"/>
330
                        <property name="debuglevel" value="${debuglevel}"/>
331
                        <property name="encoding" value="ISO_8859_1"/>
332
                </ant>
333
                <ant dir="${geoprocessing}" target="batch-build" inheritAll="false">
334
                        <property name="debug" value="${debug}"/>
335
                        <property name="debuglevel" value="${debuglevel}"/>
336
                        <property name="encoding" value="ISO_8859_1"/>
337
                </ant>
338
                <ant dir="${georeferencing}" target="batch-build" inheritAll="false">
339
                        <property name="debug" value="${debug}"/>
340
                        <property name="debuglevel" value="${debuglevel}"/>
341
                        <property name="encoding" value="ISO_8859_1"/>
342
                </ant>
343
                <ant dir="${rastertools}" target="batch-build" inheritAll="false">
344
                        <property name="debug" value="${debug}"/>
345
                        <property name="debuglevel" value="${debuglevel}"/>
346
                        <property name="encoding" value="ISO_8859_1"/>
347
                </ant>
348
                <ant dir="${wfs}" target="batch-build" inheritAll="false">
349
                        <property name="debug" value="${debug}"/>
350
                        <property name="debuglevel" value="${debuglevel}"/>
351
                        <property name="encoding" value="ISO_8859_1"/>
352
                </ant>
353
        </target>
354
        
355
        <target name="clean-all"
356
                                depends="clean-base,clean-extensions"
357
                                description="clean up" />
358
        
359
        <target name="clean-base">
360
                <!-- Delete the ${build} and ${dist} directory trees -->
361
                <ant dir="${utiles}" target="clean"/>
362
                <ant dir="${i18n}" target="clean"/>
363
                <ant dir="${andami}" target="clean"/>
364
                <ant dir="${core}" target="clean"/>
365
                <ant dir="${cms}" target="clean"/>
366
                <ant dir="${driver}" target="clean"/>
367
                <ant dir="${remote}" target="clean"/>
368
                <ant dir="${gdbms}" target="clean"/>
369
                <ant dir="${fmap}" target="clean"/>
370
                <ant dir="${gvSIG}" target="clean"/>
371
        </target>
372
        
373
        <target name="clean-extensions">
374
                <ant dir="${event}" target="clean" inheritAll="false" />
375
                <ant dir="${libdwg}" target="clean" inheritAll="false" />
376
                <ant dir="${extdwg}" target="clean" inheritAll="false" />
377
                <ant dir="${jdbc}" target="clean" inheritAll="false" />
378
                <ant dir="${cad}" target="clean" inheritAll="false" />
379
                <ant dir="${appcatalog}" target="clean" inheritAll="false" />
380
                <ant dir="${catalog}" target="clean" inheritAll="false" />
381
                <ant dir="${wcs}" target="clean" inheritAll="false" />
382
                <ant dir="${wms}" target="clean" inheritAll="false" />
383
                <ant dir="${dataloc}" target="clean" inheritAll="false" />
384
                <ant dir="${geoprocessing}" target="clean" inheritAll="false" />
385
                <ant dir="${georeferencing}" target="clean" inheritAll="false" />
386
                <ant dir="${rastertools}" target="clean" inheritAll="false" />
387
                <ant dir="${wfs}" target="clean" inheritAll="false" />
388
        </target>
389

    
390
        <!-- Those targets don't compile, they just generate the jars and copy files to
391
        andami. The compilation is supposed to be done by Eclipse  -->
392
        <target name="install-all"
393
                                        depends="install-base,install-extensions"
394
                                        description="Builds the application, including extensions" />
395
                
396
                <target name="install-base"
397
                                description="Builds the application, excluding extensions">
398
                        <ant dir="${utiles}" inheritAll="false" />
399
                          <ant dir="${i18n}" inheritAll="false" />
400
                        <ant dir="${andami}" inheritAll="false" />
401
                        <ant dir="${core}" inheritAll="false" />
402
                        <ant dir="${cms}" inheritAll="false" />
403
                        <ant dir="${driver}" inheritAll="false" />
404
                        <ant dir="${remote}" inheritAll="false" />
405
                        <ant dir="${gdbms}" inheritAll="false" />
406
                        <ant dir="${fmap}" inheritAll="false" />
407
                        <ant dir="${gvSIG}" inheritAll="false" />
408
                </target>
409
                
410
                <target name="install-extensions" depends="base">
411
                        <ant dir="${event}" inheritAll="false" />
412
                        <ant dir="${libdwg}" inheritAll="false" />
413
                        <ant dir="${extdwg}" inheritAll="false" />
414
                        <ant dir="${jdbc}" inheritAll="false" />
415
                        <ant dir="${cad}" inheritAll="false" />
416
                        <ant dir="${appcatalog}" inheritAll="false" />
417
                        <ant dir="${catalog}" inheritAll="false" />
418
                        <ant dir="${wcs}" inheritAll="false" />
419
                        <ant dir="${wms}" inheritAll="false" />
420
                        <ant dir="${dataloc}" inheritAll="false" />
421
                        <ant dir="${geoprocessing}" inheritAll="false" />
422
                        <ant dir="${georeferencing}" inheritAll="false" />
423
                        <ant dir="${rastertools}" inheritAll="false" />
424
                        <ant dir="${wfs}" inheritAll="false" />
425
                        <ant dir="${scripting}" inheritAll="false" />
426
                        <ant dir="${centerview}" inheritAll="false" />
427
                </target>
428

    
429

    
430
        
431
        
432
        <!-- The download targets are no working well yet (or maybe not working at all...) -->
433
        <target name="download"
434
                        description="downloads all the projects from the CVS HEAD"
435
                        depends="download-base, download-extensions">
436
        </target>
437

    
438
        <target name="download-base">
439
                <property name="downloadDir" value="tmp-download"/>
440
                <mkdir dir="${downloadDir}" />
441
                
442
                <!-- andami -->
443
                <cvs
444
                        dest="${downloadDir}"
445
                        package="gvSIG-project/frameworks/_fwAndami"
446
                        cvsRoot=":extssh:www.gvsig.org:/var/lib/cvs-gvSIG" />
447

    
448
                <move todir="${andami}">
449
                        <fileset dir="${downloadDir}/gvSIG-project/frameworks/_fwAndami"/>
450
                </move>
451
                
452
                <!-- we have to do the same for the rest of the projects -->
453
        </target>
454
        
455
        <target name="download-extensions">
456
        </target>
457

    
458
</project>
459