root / branches / v2_0_0_prep / examples / exaExampleCenterViewToPoint / build.xml @ 25796
History | View | Annotate | Download (10.4 KB)
1 |
<project name="extCenterViewToPoint" default="install-plugin" basedir="."> |
---|---|
2 |
<description>
|
3 |
Instala el plugin de Centrar la Vista sobre un punto en Andami. |
4 |
</description>
|
5 |
<!-- set global properties for this build -->
|
6 |
<property name="plugin" value="com.iver.gvsig.centerviewpoint"/> |
7 |
<!-- directories -->
|
8 |
<!-- change the variable to point the _fwAndami project in your workspace,
|
9 |
or the bin directory of a gvSIG installation -->
|
10 |
<!-- <property name="GVSIG_HOME" location="${user.home}/gvSIG_1.1_1009/bin"/> -->
|
11 |
<property name="GVSIG_HOME" location="${user.home}/old_workspaces/workspace-branch-1.0/_fwAndami"/> |
12 |
<property name="extensions-dir" location="${GVSIG_HOME}/bin/gvSIG/extensiones"/> |
13 |
<property name="src" location="src"/> |
14 |
<property name="build" location="bin"/> |
15 |
<property name="doc" location="doc"/> |
16 |
<property name="dist" location="dist"/> |
17 |
<!-- compilation flags -->
|
18 |
<property name="JavaSourceVersion" value="1.4"/> |
19 |
<property name="JavaTargetVersion" value="1.4"/> |
20 |
<property name="encoding" value="ISO_8859_1"/> |
21 |
<property name="debug" value="on"/> |
22 |
<property name="debuglevel" value="lines, vars"/> |
23 |
<!-- output files -->
|
24 |
<property name="zipplugin" value="${dist}/${plugin}-plugin.zip"/> |
25 |
<property name="jarName" value="com.iver.gvsig.centerviewpoint.jar"/> |
26 |
<!-- other dirs -->
|
27 |
<property name="andami" location="${GVSIG_HOME}"/> |
28 |
<property name="andamiLibs" location="${GVSIG_HOME}/libs" /> |
29 |
<property name="mainPlugin" location="${extensions-dir}/com.iver.cit.gvsig/lib/com.iver.cit.gvsig.jar"/> |
30 |
<property name="compile-classpath" value="${andami}/andami.jar:${andamiLibs}/beans.jar:${fmapLibs}/cms.jar:${fmapLibs}/fmap.jar:${mainPlugin}"/> |
31 |
<property name="installBaseDir" location="${andami}"/> |
32 |
<property name="installDir" location="${installBaseDir}/gvSIG/extensiones/${plugin}"/> |
33 |
|
34 |
|
35 |
<target name="install-plugin" |
36 |
description="prepares and installs the plugin to be used in Andami" |
37 |
depends="init,create-jar,copy-data-files,move-to-installDir"> |
38 |
</target>
|
39 |
|
40 |
<target name="batch-build" |
41 |
description="compile the sources, create the jar file, install it" |
42 |
depends="init,compile,create-jar,copy-data-files,move-to-installDir"> |
43 |
</target>
|
44 |
|
45 |
|
46 |
<target name="init"> |
47 |
<!-- Create the time stamp -->
|
48 |
<tstamp/> |
49 |
<echo>
|
50 |
Compiling ${ant.project.name}...</echo>
|
51 |
</target>
|
52 |
|
53 |
<target name="compile" description="compile the source" > |
54 |
<!-- Compile the Java code from ${src} to ${build} -->
|
55 |
<mkdir dir="${build}" /> |
56 |
<javac srcdir="${src}" |
57 |
destdir="${build}" |
58 |
source="${JavaSourceVersion}" |
59 |
target="${JavaTargetVersion}" |
60 |
debug="${debug}" |
61 |
debuglevel="${debuglevel}" |
62 |
classpath="${compile-classpath}" |
63 |
encoding="${encoding}"/> |
64 |
</target>
|
65 |
|
66 |
<target name="create-jar" |
67 |
description="Creates the plugin jar"> |
68 |
<mkdir dir="${dist}/lib"/> |
69 |
<jar jarfile="${dist}/lib/${jarName}" basedir="${build}" /> |
70 |
</target>
|
71 |
|
72 |
<target name="copy-data-files"> |
73 |
<copy file="config/config.xml" todir="${dist}"/> |
74 |
<copy file="build.number" todir="${dist}"/> |
75 |
<copy todir="${dist}"> |
76 |
<fileset dir="config" includes="text*.properties"/> |
77 |
</copy>
|
78 |
<copy todir="${dist}/images"> |
79 |
<fileset dir="images/" includes="*"/> |
80 |
</copy>
|
81 |
<copy file="config/about.htm" todir="${dist}"/> |
82 |
<loadproperties srcFile="build.number"/> |
83 |
<replace casesensitive="true" |
84 |
file="${dist}/about.htm" |
85 |
token="#build.number#" |
86 |
value="${build.number}"> |
87 |
</replace>
|
88 |
<copy todir="${dist}/theme"> |
89 |
<fileset dir="theme/" includes="*"/> |
90 |
</copy>
|
91 |
<copy todir="${dist}/data"> |
92 |
<fileset dir="data/" includes="*"/> |
93 |
</copy>
|
94 |
|
95 |
</target>
|
96 |
|
97 |
<target name="move-to-installDir"> |
98 |
<move todir="${installDir}"> |
99 |
<fileset dir="${dist}" includes="**/**"/> |
100 |
</move>
|
101 |
</target>
|
102 |
|
103 |
<target name="copy-to-installDir"> |
104 |
<copy todir="${installDir}" overwrite="yes"> |
105 |
<fileset dir="${dist}" includes="**/**"/> |
106 |
</copy>
|
107 |
</target>
|
108 |
|
109 |
<target name="dist" depends="clean,init,create-jar,copy-data-files" |
110 |
description="generate a ZIP file with the plugin distribution"> |
111 |
<mkdir dir="${dist}/src"/> |
112 |
<!-- Copy necessary distribution files to dist dir -->
|
113 |
<copy todir="${dist}/src"> |
114 |
<fileset dir="${src}"/> |
115 |
</copy>
|
116 |
<copy file="build.xml" todir="${dist}"/> |
117 |
<!-- Zip distribution -->
|
118 |
<zip destfile="${zipplugin}" |
119 |
basedir="${dist}" |
120 |
update="true" |
121 |
/>
|
122 |
<delete dir="${dist}" failonerror="false" excludes="${zipplugin}"/> |
123 |
</target>
|
124 |
|
125 |
<target name="clean" |
126 |
description="clean dist directory" > |
127 |
<!-- Clean the distribution directory -->
|
128 |
<delete dir="${dist}" failonerror="false"/> |
129 |
</target>
|
130 |
|
131 |
|
132 |
<!-- specific targets to install the examples step by step -->
|
133 |
<target name="install-about" |
134 |
description="installs the about extension"> |
135 |
<mkdir dir="${dist}/lib"/> |
136 |
<jar jarfile="${dist}/lib/${jarName}" basedir="${build}" |
137 |
includes="org/gvsig/examples/example1/about/*" |
138 |
update="yes"/> |
139 |
<copy file="config/config-step1.xml" tofile="${dist}/config.xml" /> |
140 |
<copy todir="${dist}"> |
141 |
<fileset dir="config" includes="text*.properties"/> |
142 |
</copy>
|
143 |
<copy todir="${dist}/images"> |
144 |
<fileset dir="images/" includes="logoIver.png,logo_horiz_bicolor_gva.png"/> |
145 |
</copy>
|
146 |
<copy file="config/about.htm" todir="${dist}"/> |
147 |
<buildnumber/> |
148 |
<loadproperties srcFile="build.number"/> |
149 |
<replace casesensitive="true" |
150 |
file="${dist}/about.htm" |
151 |
token="#build.number#" |
152 |
value="${build.number}"> |
153 |
</replace>
|
154 |
<copy file="build.number" todir="${dist}"/> |
155 |
<antcall target="copy-to-installDir"/> |
156 |
</target>
|
157 |
|
158 |
<target name="step1" depends="install-about"/> |
159 |
|
160 |
<target name="install-theme" |
161 |
description="installs a custom Andami theme"> |
162 |
<copy todir="${andami}/theme/" overwrite="true"> |
163 |
<fileset dir="theme" includes="andami-theme.xml"/> |
164 |
</copy>
|
165 |
<copy todir="${dist}/theme/" overwrite="true"> |
166 |
<fileset dir="theme" includes="*"/> |
167 |
</copy>
|
168 |
<antcall target="copy-to-installDir"/> |
169 |
</target>
|
170 |
|
171 |
<target name="step2" depends="install-about, install-theme"/> |
172 |
|
173 |
<target name="install-exclusiveui" |
174 |
description="installs the exclusiveUI extension"> |
175 |
<mkdir dir="${dist}/lib"/> |
176 |
<jar jarfile="${dist}/lib/${jarName}" basedir="${build}" |
177 |
includes="org/gvsig/examples/example1/exclusiveUI/*" |
178 |
update="yes"/> |
179 |
<copy overwrite="yes" file="config/config-step3.xml" tofile="${dist}/config.xml" /> |
180 |
<copy todir="${dist}"> |
181 |
<fileset dir="config" includes="text*.properties"/> |
182 |
</copy>
|
183 |
<antcall target="copy-to-installDir"/> |
184 |
</target>
|
185 |
|
186 |
<target name="step3" depends="install-about, install-theme, install-exclusiveui"/> |
187 |
|
188 |
<target name="install-loadlayer" |
189 |
description="installs the load CSV layer extension"> |
190 |
<mkdir dir="${dist}/lib"/> |
191 |
<jar jarfile="${dist}/lib/${jarName}" basedir="${build}" |
192 |
includes="org/gvsig/examples/example1/loadCSVLayer/*" |
193 |
update="yes"/> |
194 |
<copy overwrite="yes" file="config/config-step4.xml" tofile="${dist}/config.xml" /> |
195 |
<copy todir="${dist}"> |
196 |
<fileset dir="config" includes="text*.properties"/> |
197 |
</copy>
|
198 |
<copy todir="${dist}/data"> |
199 |
<fileset dir="data/" includes="*"/> |
200 |
</copy>
|
201 |
<antcall target="copy-to-installDir"/> |
202 |
</target>
|
203 |
|
204 |
<target name="step4" depends="install-about, install-theme, install-exclusiveui, install-loadlayer"/> |
205 |
|
206 |
<target name="install-preferences" |
207 |
description="installs a preferences page"> |
208 |
<mkdir dir="${dist}/lib"/> |
209 |
<jar jarfile="${dist}/lib/${jarName}" basedir="${build}" |
210 |
includes="org/gvsig/examples/example1/centerViewToPoint/CenterViewToPointPage.class org/gvsig/examples/example1/centerViewToPoint/PreferencePageExtension.class org/gvsig/examples/example1/centerViewToPoint/CenterViewToPointExtension.class" |
211 |
update="yes"/> |
212 |
<copy todir="${dist}/images"> |
213 |
<fileset dir="images/" includes="CenterView.png"/> |
214 |
</copy>
|
215 |
<copy overwrite="yes" file="config/config-step5.xml" tofile="${dist}/config.xml" /> |
216 |
<copy todir="${dist}"> |
217 |
<fileset dir="config" includes="text*.properties"/> |
218 |
</copy>
|
219 |
<antcall target="copy-to-installDir"/> |
220 |
</target>
|
221 |
|
222 |
<target name="step5" depends="install-about, install-theme, install-exclusiveui, install-loadlayer, install-preferences"/> |
223 |
|
224 |
<target name="install-centerViewToPoint" |
225 |
description="installs a tool to center the view to the provided point"> |
226 |
<mkdir dir="${dist}/lib"/> |
227 |
<jar jarfile="${dist}/lib/${jarName}" basedir="${build}" |
228 |
includes="org/gvsig/examples/example1/centerViewToPoint/CenterViewToPointExtension.class org/gvsig/examples/example1/centerViewToPoint/InputCoordinatesPanel*.class" |
229 |
update="yes"/> |
230 |
<copy overwrite="yes" file="config/config-step6.xml" tofile="${dist}/config.xml" /> |
231 |
<copy todir="${dist}"> |
232 |
<fileset dir="config" includes="text*.properties"/> |
233 |
</copy>
|
234 |
<copy todir="${dist}/images"> |
235 |
<fileset dir="images/" includes="centerviewtopoint.png"/> |
236 |
</copy>
|
237 |
<antcall target="copy-to-installDir"/> |
238 |
</target>
|
239 |
|
240 |
<target name="step6" depends="install-about, install-theme, install-exclusiveui, install-loadlayer, install-preferences, install-centerViewToPoint"/> |
241 |
|
242 |
<target name="install-tocMenu" |
243 |
description="installs a tool to center the view to the provided point"> |
244 |
<mkdir dir="${dist}/lib"/> |
245 |
<jar jarfile="${dist}/lib/${jarName}" basedir="${build}" |
246 |
includes="org/gvsig/examples/example1/centerViewToPoint/PropertiesTocMenuEntry.class org/gvsig/examples/example1/centerViewToPoint/TOCMenuExtension.class" |
247 |
update="yes"/> |
248 |
<copy overwrite="yes" file="config/config-step7.xml" tofile="${dist}/config.xml" /> |
249 |
<copy todir="${dist}"> |
250 |
<fileset dir="config" includes="text*.properties"/> |
251 |
</copy>
|
252 |
<antcall target="copy-to-installDir"/> |
253 |
</target>
|
254 |
|
255 |
<target name="step7" depends="install-about, install-theme, install-exclusiveui, install-loadlayer, install-preferences, install-centerViewToPoint, install-tocMenu"/> |
256 |
|
257 |
<target name="install-infotool" |
258 |
description="installs a tool to center the view to the provided point"> |
259 |
<mkdir dir="${dist}/lib"/> |
260 |
<jar jarfile="${dist}/lib/${jarName}" basedir="${build}" |
261 |
includes="org/gvsig/examples/example1/infotool/**/*" |
262 |
update="yes"/> |
263 |
<copy overwrite="yes" file="config/config.xml" tofile="${dist}/config.xml" /> |
264 |
<copy todir="${dist}"> |
265 |
<fileset dir="config" includes="text*.properties"/> |
266 |
</copy>
|
267 |
<copy todir="${dist}/images"> |
268 |
<fileset dir="images/" includes="Identify.png"/> |
269 |
</copy>
|
270 |
<antcall target="copy-to-installDir"/> |
271 |
</target>
|
272 |
|
273 |
<target name="step8" depends="install-about, install-theme, install-exclusiveui, install-loadlayer, install-preferences, install-centerViewToPoint, install-tocMenu, install-infotool"/> |
274 |
</project>
|
275 |
|