Statistics
| Revision:

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

History | View | Annotate | Download (13.9 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.3.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
                        classpath="${compile-classpath}"
121
                        excludes="com/iver/cit/gvsig/test/**"/>
122
        </target>        
123

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

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

    
201
        <target name="build-all"
202
                                depends="base,extensions"
203
                                description="Builds the application, including extensions" />
204
        
205
        <target name="base"
206
                        description="Builds the application, excluding extensions">
207
                <ant dir="${utiles}" target="batch-build" inheritAll="false" />
208
                  <ant dir="${i18n}" target="batch-build" inheritAll="false" />
209
                <ant dir="${andami}" target="batch-build"  inheritAll="false" />
210
                <ant dir="${core}" target="batch-build"  inheritAll="false" />
211
                <ant dir="${cms}" target="batch-build"  inheritAll="false" />
212
                <ant dir="${driver}" target="batch-build"  inheritAll="false" />
213
                <ant dir="${remote}" target="batch-build"  inheritAll="false" />
214
                <ant dir="${gdbms}" target="batch-build" inheritAll="false" />
215
                <ant dir="${fmap}" target="batch-build"  inheritAll="false" />
216
                <ant dir="${gvSIG}" target="batch-build"  inheritAll="false" />
217
        </target>
218
        
219
        <target name="extensions" depends="base">
220
                <ant dir="${event}" target="batch-build" inheritAll="false" />
221
                <ant dir="${libdwg}" target="batch-build" inheritAll="false" />
222
                <ant dir="${extdwg}" target="batch-build" inheritAll="false" />
223
                <ant dir="${jdbc}" target="batch-build" inheritAll="false" />
224
                <ant dir="${cad}" target="batch-build" inheritAll="false" />
225
                <ant dir="${appcatalog}" target="batch-build" inheritAll="false" />
226
                <ant dir="${catalog}" target="batch-build" inheritAll="false" />
227
                <ant dir="${wcs}" target="batch-build" inheritAll="false" />
228
                <ant dir="${wms}" target="batch-build" inheritAll="false" />
229
                <ant dir="${dataloc}" target="batch-build" inheritAll="false" />
230
                <ant dir="${geoprocessing}" target="batch-build" inheritAll="false" />
231
                <ant dir="${georeferencing}" target="batch-build" inheritAll="false" />
232
                <ant dir="${rastertools}" target="batch-build" inheritAll="false" />
233
                <ant dir="${wfs}" target="batch-build" inheritAll="false" />
234
        </target>
235

    
236

    
237
        <target name="clean-all"
238
                                depends="clean-base,clean-extensions"
239
                                description="clean up" />
240
        
241
        <target name="clean-base">
242
                <!-- Delete the ${build} and ${dist} directory trees -->
243
                <ant dir="${utiles}" target="clean"/>
244
                <ant dir="${i18n}" target="clean"/>
245
                <ant dir="${andami}" target="clean"/>
246
                <ant dir="${core}" target="clean"/>
247
                <ant dir="${cms}" target="clean"/>
248
                <ant dir="${driver}" target="clean"/>
249
                <ant dir="${remote}" target="clean"/>
250
                <ant dir="${gdbms}" target="clean"/>
251
                <ant dir="${fmap}" target="clean"/>
252
                <ant dir="${gvSIG}" target="clean"/>
253
        </target>
254
        
255
        <target name="clean-extensions">
256
                <ant dir="${event}" target="clean" inheritAll="false" />
257
                <ant dir="${libdwg}" target="clean" inheritAll="false" />
258
                <ant dir="${extdwg}" target="clean" inheritAll="false" />
259
                <ant dir="${jdbc}" target="clean" inheritAll="false" />
260
                <ant dir="${cad}" target="clean" inheritAll="false" />
261
                <ant dir="${appcatalog}" target="clean" inheritAll="false" />
262
                <ant dir="${catalog}" target="clean" inheritAll="false" />
263
                <ant dir="${wcs}" target="clean" inheritAll="false" />
264
                <ant dir="${wms}" target="clean" inheritAll="false" />
265
                <ant dir="${dataloc}" target="clean" inheritAll="false" />
266
                <ant dir="${geoprocessing}" target="clean" inheritAll="false" />
267
                <ant dir="${georeferencing}" target="clean" inheritAll="false" />
268
                <ant dir="${rastertools}" target="clean" inheritAll="false" />
269
                <ant dir="${wfs}" target="clean" inheritAll="false" />
270
        </target>
271

    
272
        <!-- Those targets don't compile, they just generate the jars and copy files to
273
        andami. The compilation is supposed to be done by Eclipse  -->
274
        <target name="install-all"
275
                                        depends="base,extensions"
276
                                        description="Builds the application, including extensions" />
277
                
278
                <target name="-install-base"
279
                                description="Builds the application, excluding extensions">
280
                        <ant dir="${utiles}" inheritAll="false" />
281
                          <ant dir="${i18n}" inheritAll="false" />
282
                        <ant dir="${andami}" inheritAll="false" />
283
                        <ant dir="${core}" inheritAll="false" />
284
                        <ant dir="${cms}" inheritAll="false" />
285
                        <ant dir="${driver}" inheritAll="false" />
286
                        <ant dir="${remote}" inheritAll="false" />
287
                        <ant dir="${gdbms}" inheritAll="false" />
288
                        <ant dir="${fmap}" inheritAll="false" />
289
                        <ant dir="${gvSIG}" inheritAll="false" />
290
                </target>
291
                
292
                <target name="install-extensions" depends="base">
293
                        <ant dir="${event}" inheritAll="false" />
294
                        <ant dir="${libdwg}" inheritAll="false" />
295
                        <ant dir="${extdwg}" inheritAll="false" />
296
                        <ant dir="${jdbc}" inheritAll="false" />
297
                        <ant dir="${cad}" inheritAll="false" />
298
                        <ant dir="${appcatalog}" inheritAll="false" />
299
                        <ant dir="${catalog}" inheritAll="false" />
300
                        <ant dir="${wcs}" inheritAll="false" />
301
                        <ant dir="${wms}" inheritAll="false" />
302
                        <ant dir="${dataloc}" inheritAll="false" />
303
                        <ant dir="${geoprocessing}" inheritAll="false" />
304
                        <ant dir="${georeferencing}" inheritAll="false" />
305
                        <ant dir="${rastertools}" inheritAll="false" />
306
                        <ant dir="${wfs}" inheritAll="false" />
307
                        <ant dir="${scripting}" inheritAll="false" />
308
                        <ant dir="${centerview}" inheritAll="false" />
309
                </target>
310

    
311

    
312
        
313
        
314
        <!-- The download targets are no working well yet (or maybe not working at all...) -->
315
        <target name="download"
316
                        description="downloads all the projects from the CVS HEAD"
317
                        depends="download-base, download-extensions">
318
        </target>
319

    
320
        <target name="download-base">
321
                <property name="downloadDir" value="tmp-download"/>
322
                <mkdir dir="${downloadDir}" />
323
                
324
                <!-- andami -->
325
                <cvs
326
                        dest="${downloadDir}"
327
                        package="gvSIG-project/frameworks/_fwAndami"
328
                        cvsRoot=":extssh:www.gvsig.org:/var/lib/cvs-gvSIG" />
329

    
330
                <move todir="${andami}">
331
                        <fileset dir="${downloadDir}/gvSIG-project/frameworks/_fwAndami"/>
332
                </move>
333
                
334
                <!-- we have to do the same for the rest of the projects -->
335
        </target>
336
        
337
        <target name="download-extensions">
338
        </target>
339

    
340
</project>
341