svn-gvsig-desktop / tags / tmp_build / extensions / extCatalogAndGazetteer / build.xml @ 44178
History | View | Annotate | Download (8.9 KB)
1 | 16171 | jpiera | <project name="Generar extension en Andami" default="generate-without-source" basedir="."> |
---|---|---|---|
2 | 1976 | luisw | <description>
|
3 | Instala el plugin en Andami |
||
4 | </description>
|
||
5 | <!-- set global properties for this build -->
|
||
6 | 3661 | jorpiell | <property name="src" location="src"/> |
7 | <property name="build" location="bin"/> |
||
8 | <property name="dist" location="dist"/> |
||
9 | <property name="mainplugin" value="com.iver.cit.gvsig"/> |
||
10 | <property name="gvsiglibjar" value="gvsig-catalogClient"/> |
||
11 | 16339 | jmvivo | |
12 | 3661 | jorpiell | <property name="catalogPlugin" value="es.gva.cit.gvsig.catalogClient"/> |
13 | 34622 | fdiaz | <property name="plugin" value="${catalogPlugin}"/> |
14 | 3661 | jorpiell | <property name="gazzetterPlugin" value="es.gva.cit.gvsig.gazetteer"/> |
15 | <property name="remoteClientPlugin" value="remoteClient"/> |
||
16 | <property name="wfsPlugin" value="wfs"/> |
||
17 | <property name="postgisPlugin" value="postgis"/> |
||
18 | 16339 | jmvivo | |
19 | 13109 | jmvivo | <property name="appCatalogDir" value="../appCatalogAndGazetteerClient"/> |
20 | 4238 | jorpiell | <property name="remoteClientsDir" value="../libRemoteServices"/> |
21 | 16339 | jmvivo | |
22 | 5607 | cesar | <property name="lib" value="lib"/> |
23 | <property name="andami" value="../_fwAndami"/> |
||
24 | <property name="extensionsDir" location="${andami}/gvSIG/extensiones"/> |
||
25 | <property name="catProtocolJarName" value="catCliProto.jar"/> |
||
26 | <property name="andamiJar" location="${andami}/andami.jar"/> |
||
27 | <property name="gvsigJar" location="${extensionsDir}/com.iver.cit.gvsig/lib/com.iver.cit.gvsig.jar"/> |
||
28 | <property name="andamiLibs" location="${andami}/lib"/> |
||
29 | <property name="fmapLibs" location="../libFMap/lib" /> |
||
30 | 16339 | jmvivo | <import file="../binaries/ant/utilities.xml"/> |
31 | 13109 | jmvivo | |
32 | 16339 | jmvivo | |
33 | |||
34 | 1976 | luisw | <target name="init"> |
35 | <!-- Create the time stamp -->
|
||
36 | <tstamp/> |
||
37 | <!-- Create the build directory structure used by compile -->
|
||
38 | <mkdir dir="${build}"/> |
||
39 | <mkdir dir="${dist}"/> |
||
40 | <!-- Creamos un fichero con el timeStamp para que lo lea el FPanelAbout -->
|
||
41 | 16339 | jmvivo | |
42 | 1976 | luisw | </target>
|
43 | 16339 | jmvivo | |
44 | 15557 | jpiera | <target name="buildNumber"> |
45 | <!-- <echo> Obsoleto: este proyecto se distribuye con gvSIG de base </echo> -->
|
||
46 | 16339 | jmvivo | |
47 | 15557 | jpiera | <propertyfile
|
48 | file="build.number" |
||
49 | comment="Build Number for ANT. Do not edit!"> |
||
50 | <entry key="build.number" default="0" type="int" operation="+"/> |
||
51 | </propertyfile>
|
||
52 | <property file="build.number"/> |
||
53 | 1976 | luisw | |
54 | 16339 | jmvivo | </target>
|
55 | 15557 | jpiera | |
56 | <target name="import-build-number"> |
||
57 | <copy todir="."> |
||
58 | <fileset file="${buildNumberFile}"/> |
||
59 | </copy>
|
||
60 | </target>
|
||
61 | |||
62 | <target name="generate-without-source_old" |
||
63 | 1976 | luisw | description="generate the distribution without the source file"> |
64 | <!-- depends="wcs-driver" -->
|
||
65 | <!-- Create the distribution directory -->
|
||
66 | <mkdir dir="${dist}"/> |
||
67 | 2026 | luisw | <mkdir dir="${dist}/lib"/> |
68 | 16339 | jmvivo | |
69 | 1976 | luisw | <!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file -->
|
70 | 5607 | cesar | <jar jarfile="${dist}/lib/${catProtocolJarName}" basedir="${appCatalogDir}/bin"/> |
71 | 3661 | jorpiell | <jar jarfile="${dist}/lib/${remoteClientPlugin}.jar" basedir="${remoteClientsDir}/bin"/> |
72 | 15557 | jpiera | <jar jarfile="${dist}/lib/${catalogPlugin}.jar" basedir="${build}" includes="es/gva/cit/gvsig/catalog/**"/> |
73 | 3661 | jorpiell | <jar jarfile="${dist}/lib/${gazzetterPlugin}.jar" basedir="${build}" includes="es/gva/cit/gvsig/gazetteer/**"/> |
74 | 2986 | jorpiell | <copy file="config/config.xml" todir="${dist}"/> |
75 | 10187 | jmvivo | <copy file="build.number" todir="${dist}"/> |
76 | 15557 | jpiera | <copy file="config/about.htm" todir="${dist}"/> |
77 | <loadproperties srcFile="build.number"/> |
||
78 | <replace casesensitive="true" |
||
79 | file="${dist}/about.htm" |
||
80 | token="#build.number#" |
||
81 | value="${build.number}"/> |
||
82 | <replace casesensitive="true" |
||
83 | file="${dist}/about.htm" |
||
84 | token="#build.number.original#" |
||
85 | 16339 | jmvivo | value="${build.number.original}"/> |
86 | 1976 | luisw | <copy file="config/plugin.dtd" todir="${dist}"/> |
87 | <copy todir="${dist}"> |
||
88 | 5617 | cesar | <fileset dir="config" includes="text*.properties"/> |
89 | 1976 | luisw | </copy>
|
90 | <copy todir="${dist}/images"> |
||
91 | 3661 | jorpiell | <fileset dir="${appCatalogDir}/images/" includes="*"/> |
92 | 1976 | luisw | </copy>
|
93 | 7393 | jorpiell | <copy todir="${dist}/config"> |
94 | <fileset dir="${appCatalogDir}/config/" includes="*"/> |
||
95 | </copy>
|
||
96 | 1976 | luisw | <copy todir="${dist}"> |
97 | <!--fileset dir="./lib" includes="*.jar,*.zip"/ -->
|
||
98 | <fileset dir="." includes=".keystore"/> |
||
99 | 3661 | jorpiell | <fileset dir="${appCatalogDir}" includes="servers.txt"/> |
100 | 2026 | luisw | </copy>
|
101 | <copy todir="${dist}/lib"> |
||
102 | 3661 | jorpiell | <fileset dir="${appCatalogDir}/lib" includes="*.jar"/> |
103 | 1976 | luisw | </copy>
|
104 | 5607 | cesar | <move todir="${extensionsDir}/${catalogPlugin}/"> |
105 | 1976 | luisw | <fileset dir="${dist}" includes="**/**"/> |
106 | </move>
|
||
107 | 5607 | cesar | <delete file="${extensionsDir}/${catalogPlugin}/lib/xercesImpl.jar"/> |
108 | <delete file="${extensionsDir}/${catalogPlugin}/lib/xml-apis.jar"/> |
||
109 | 16339 | jmvivo | |
110 | 1976 | luisw | </target>
|
111 | |||
112 | 5607 | cesar | <target name="generate-with-source" |
113 | description="generate the distribution with the source file"> |
||
114 | 1976 | luisw | <!-- Create the distribution directory -->
|
115 | <mkdir dir="${dist}"/> |
||
116 | |||
117 | <!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file -->
|
||
118 | 3661 | jorpiell | <jar jarfile="${dist}/${catalogPlugin}.jar" basedir="${build}"/> |
119 | 1976 | luisw | <copy file="config/config.xml" todir="${dist}"/> |
120 | 10187 | jmvivo | <copy file="build.number" todir="${dist}"/> |
121 | 15557 | jpiera | <copy file="config/about.htm" todir="${dist}"/> |
122 | <loadproperties srcFile="build.number"/> |
||
123 | <replace casesensitive="true" |
||
124 | file="${dist}/about.htm" |
||
125 | token="#build.number#" |
||
126 | value="${build.number}"/> |
||
127 | <replace casesensitive="true" |
||
128 | file="${dist}/about.htm" |
||
129 | token="#build.number.original#" |
||
130 | 16339 | jmvivo | value="${build.number.original}"/> |
131 | 1976 | luisw | <copy file="config/plugin.dtd" todir="${dist}"/> |
132 | <copy todir="${dist}"> |
||
133 | 5617 | cesar | <fileset dir="config" includes="text*.properties"/> |
134 | 1976 | luisw | </copy>
|
135 | <copy todir="${dist}"> |
||
136 | <fileset dir="." includes="${src}"/> |
||
137 | </copy>
|
||
138 | <copy todir="${dist}/images"> |
||
139 | <fileset dir="images/" includes="*"/> |
||
140 | </copy>
|
||
141 | <!--copy todir="${dist}">
|
||
142 | <fileset dir="./lib" includes="*.jar,*.zip"/>
|
||
143 | </copy-->
|
||
144 | 3661 | jorpiell | <move todir="${extension-dir}/${catalogPlugin}/"> |
145 | 1976 | luisw | <fileset dir="${dist}" includes="**/**"/> |
146 | </move>
|
||
147 | </target>
|
||
148 | |||
149 | 5607 | cesar | <target name="batch-build" |
150 | description="compile the sources, create the jar file" |
||
151 | depends="call-appCatalog-build,compile,create-jar,copy-data-files,move-to-andami"> |
||
152 | </target>
|
||
153 | 16339 | jmvivo | |
154 | 5607 | cesar | <target name="call-appCatalog-build"> |
155 | 16171 | jpiera | <ant dir="${appCatalogDir}" target="batch-build" inheritAll="false"> |
156 | 5607 | cesar | <property name="targetDir" location="${dist}/lib"/> |
157 | <property name="jarName" value="catCliProto.jar"/> |
||
158 | <property name="andamiLibs" value="${andamiLibs}"/> |
||
159 | </ant>
|
||
160 | </target>
|
||
161 | |||
162 | <target name="compile" description="compile the source" > |
||
163 | <!-- Compile the Java code from ${src} to ${build} -->
|
||
164 | 16339 | jmvivo | <antcall target="gvSIG-import-build-number"/> |
165 | 5607 | cesar | <mkdir dir="${build}" /> |
166 | 16339 | jmvivo | <loadEclipseClasspath project="${basedir}"/> |
167 | <gvSIG-javac
|
||
168 | classpath="${eclipseClasspath}"/> |
||
169 | 5607 | cesar | </target>
|
170 | 16339 | jmvivo | |
171 | |||
172 | 5607 | cesar | <target name="create-jar" |
173 | description="Creates the plugin jar"> |
||
174 | <mkdir dir="${dist}/lib"/> |
||
175 | 15557 | jpiera | <jar jarfile="${dist}/lib/${catalogPlugin}.jar" basedir="${build}" includes="es/gva/cit/gvsig/catalog/**"/> |
176 | 5607 | cesar | <jar jarfile="${dist}/lib/${gazzetterPlugin}.jar" basedir="${build}" includes="es/gva/cit/gvsig/gazetteer/**"/> |
177 | </target>
|
||
178 | |||
179 | 34622 | fdiaz | <target name="copy-data-files" depends="make-package-info"> |
180 | 5607 | cesar | <copy file="config/config.xml" todir="${dist}"/> |
181 | 10187 | jmvivo | <copy file="build.number" todir="${dist}"/> |
182 | 34622 | fdiaz | <copy file="package.info" todir="${dist}"/> |
183 | 15557 | jpiera | <copy file="config/about.htm" todir="${dist}"/> |
184 | <loadproperties srcFile="build.number"/> |
||
185 | <replace casesensitive="true" |
||
186 | file="${dist}/about.htm" |
||
187 | token="#build.number#" |
||
188 | value="${build.number}"/> |
||
189 | <replace casesensitive="true" |
||
190 | file="${dist}/about.htm" |
||
191 | token="#build.number.original#" |
||
192 | 16339 | jmvivo | value="${build.number.original}"/> |
193 | 5607 | cesar | <copy file="config/plugin.dtd" todir="${dist}"/> |
194 | <copy todir="${dist}"> |
||
195 | 5617 | cesar | <fileset dir="config" includes="text*.properties"/> |
196 | 5607 | cesar | </copy>
|
197 | <copy todir="${dist}/images"> |
||
198 | 15557 | jpiera | <fileset dir="images" includes="*"/> |
199 | </copy>
|
||
200 | <copy todir="${dist}/images"> |
||
201 | 5607 | cesar | <fileset dir="${appCatalogDir}/images/" includes="*"/> |
202 | </copy>
|
||
203 | <copy todir="${dist}"> |
||
204 | <!--fileset dir="./lib" includes="*.jar,*.zip"/ -->
|
||
205 | <fileset dir="." includes=".keystore"/> |
||
206 | <fileset dir="${appCatalogDir}" includes="servers.txt"/> |
||
207 | </copy>
|
||
208 | 8565 | cesar | <copy todir="${dist}/config"> |
209 | <fileset dir="${appCatalogDir}/config/" includes="*"/> |
||
210 | </copy>
|
||
211 | 5607 | cesar | </target>
|
212 | 16339 | jmvivo | |
213 | 5607 | cesar | <target name="move-to-andami"> |
214 | <copy todir="${dist}/lib"> |
||
215 | <fileset dir="${appCatalogDir}/lib" includes="*.jar"/> |
||
216 | </copy>
|
||
217 | <move todir="${extensionsDir}/${catalogPlugin}/"> |
||
218 | <fileset dir="${dist}" includes="**/**"/> |
||
219 | </move>
|
||
220 | </target>
|
||
221 | |||
222 | <target name="clean" |
||
223 | description="clean up" > |
||
224 | <!-- Delete the ${build} and ${dist} directory trees -->
|
||
225 | <delete dir="${build}"/> |
||
226 | <delete dir="${dist}"/> |
||
227 | </target>
|
||
228 | |||
229 | 16339 | jmvivo | |
230 | 5607 | cesar | <target name="clean-orig" |
231 | 1976 | luisw | description="clean up" > |
232 | <!-- Delete the ${build} and ${dist} directory trees -->
|
||
233 | 16339 | jmvivo | |
234 | |||
235 | 13466 | cesar | </target>
|
236 | 15557 | jpiera | <target name="distribution" |
237 | description="increment build number and generate the distribution without the source file" |
||
238 | depends="buildNumber,call-appCatalog-build,compile,create-jar,copy-data-files,move-to-andami"> |
||
239 | </target>
|
||
240 | 16339 | jmvivo | |
241 | 15557 | jpiera | <target name="generate-without-source" |
242 | description="generate the distribution with the source file" |
||
243 | depends="call-appCatalog-build,create-jar,copy-data-files,move-to-andami"> |
||
244 | 13109 | jmvivo | |
245 | 13466 | cesar | </target>
|
246 | 1976 | luisw | </project>
|