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