svn-gvsig-desktop / tags / v1_1_Build_1012 / extensions / extScripting / build.xml @ 12987
History | View | Annotate | Download (8.22 KB)
1 |
<project name="extScripting" default="batch-build" 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="extensions-dir" location="../_fwAndami/gvSIG/extensiones"/> |
7 |
<property name="src" location="src"/> |
8 |
<property name="build" location="bin"/> |
9 |
<property name="doc" location="doc"/> |
10 |
<property name="scripts" location="scripts"/> |
11 |
<property name="dist" location="dist"/> |
12 |
<property name="lib" location="lib"/> |
13 |
<property name="extensionDir" location="../_fwAndami/gvSIG/extensiones"/> |
14 |
<property name="mainplugin" value="com.iver.cit.gvsig"/> |
15 |
<property name="without_src" location="without_src"/> |
16 |
<property name="plugin" value="org.gvsig.scripting"/> |
17 |
<property name="jarName" value="${plugin}.jar"/> |
18 |
<property name="andami" location="../_fwAndami"/> |
19 |
<property name="andamiLibs" location="${andami}/lib"/> |
20 |
<property name="fmap" location="../libFMap"/> |
21 |
<property name="fmapLibs" location="${fmap}/lib"/> |
22 |
<property name="installBaseDir" location="${andami}"/> |
23 |
<property name="installDir" location="${installBaseDir}/gvSIG/extensiones/${plugin}"/> |
24 |
<property name="installLibDir" location="${installBaseDir}/gvSIG/extensiones/${mainplugin}/lib"/> |
25 |
<property name="compile-classpath" value="${andami}/andami.jar:${lib}/bsf-2.3.0rc1.jar:${lib}/bsh-2.0b1.jar:${lib}/groovy-all-1.0-beta-7.jar:${andamiLibs}/iver-utiles.jar:${lib}/jython-2.1.jar:${lib}/scriptablethinlet-0.9.jar:${lib}/thinlet.jar:${fmapLibs}/fmap.jar:${installLibDir}/${mainplugin}.jar"/> |
26 |
<property name="JavaSourceVersion" value="1.4"/> |
27 |
<property name="JavaTargetVersion" value="1.4"/> |
28 |
<property name="encoding" value="ISO_8859_1"/> |
29 |
|
30 |
<target name="init"> |
31 |
<!-- Create the time stamp -->
|
32 |
<tstamp/> |
33 |
<echo>
|
34 |
Compiling ${ant.project.name}...</echo>
|
35 |
</target>
|
36 |
|
37 |
<target name="import-build-number"> |
38 |
<copy todir="."> |
39 |
<fileset file="${buildNumberFile}"/> |
40 |
</copy>
|
41 |
</target>
|
42 |
|
43 |
<target name="dist" depends="init" |
44 |
description="generate the distribution" > |
45 |
<!-- Remove previous distribution directory -->
|
46 |
<delete dir="${dist}"/> |
47 |
<!-- Create the distribution directory structure -->
|
48 |
<mkdir dir="${dist}"/> |
49 |
<mkdir dir="${dist}/src"/> |
50 |
<mkdir dir="${dist}/doc"/> |
51 |
<mkdir dir="${dist}/bin"/> |
52 |
<mkdir dir="${dist}/scripts"/> |
53 |
<mkdir dir="${dist}/lib"/> |
54 |
<mkdir dir="${dist}/bin/org"/> |
55 |
<mkdir dir="${dist}/bin/org/gvsig"/> |
56 |
<mkdir dir="${dist}/bin/org/gvsig/scripting"/> |
57 |
<mkdir dir="${dist}/bin/org/gvsig/scripting/images"/> |
58 |
<mkdir dir="${dist}/images"/> |
59 |
<mkdir dir="${dist}/config"/> |
60 |
<!-- Copy necessary distribution files to dist dir -->
|
61 |
<copy todir="${dist}/src"> |
62 |
<fileset dir="${src}"/> |
63 |
</copy>
|
64 |
<copy todir="${dist}/lib"> |
65 |
<fileset dir="${lib}"/> |
66 |
</copy>
|
67 |
<copy todir="${dist}/doc"> |
68 |
<fileset dir="${doc}"/> |
69 |
</copy>
|
70 |
<copy todir="${dist}/scripts"> |
71 |
<fileset dir="${scripts}"/> |
72 |
</copy>
|
73 |
<copy todir="${dist}/images"> |
74 |
<fileset dir="images"/> |
75 |
</copy>
|
76 |
<copy file="config/config.xml" todir="${dist}/config"/> |
77 |
<copy file="build.number" todir="${dist}"/> |
78 |
<copy file="build.xml" todir="${dist}"/> |
79 |
<copy todir="${dist}"> |
80 |
<fileset dir="config" includes="text*.properties"/> |
81 |
</copy>
|
82 |
<copy todir="${dist}/bin/org/gvsig/scripting"> |
83 |
<fileset dir="config" includes="text*.properties"/> |
84 |
</copy>
|
85 |
<jar jarfile="${dist}/bin/org/gvsig/scripting/${plugin}.jar" basedir="${build}"/> |
86 |
<copy file="config/config.xml" todir="${dist}/bin/org/gvsig/scripting"/> |
87 |
<copy file="build.number" todir="${dist}/bin/org/gvsig/scripting"/> |
88 |
<copy todir="${dist}/bin/org/gvsig/scripting/images"> |
89 |
<fileset dir="images"/> |
90 |
</copy>
|
91 |
<!-- Zip distribution -->
|
92 |
<zip destfile="${dist}/gvSIGScriptingPlugin.zip" |
93 |
basedir="${dist}" |
94 |
update="true" |
95 |
/>
|
96 |
</target>
|
97 |
|
98 |
<target name="clean-orig" depends="dist" |
99 |
description="clean dist directory" > |
100 |
<!-- Clean the distribution directory -->
|
101 |
<delete dir="${dist}/src"/> |
102 |
<delete dir="${dist}/lib"/> |
103 |
<delete dir="${dist}/doc"/> |
104 |
<delete dir="${dist}/bin"/> |
105 |
<delete dir="${dist}/scripts"/> |
106 |
<delete dir="${dist}/images"/> |
107 |
<delete dir="${dist}/config"/> |
108 |
<delete file="${dist}/build.xml"/> |
109 |
<delete>
|
110 |
<fileset dir="${dist}" includes="**/*.properties"/> |
111 |
</delete>
|
112 |
</target>
|
113 |
|
114 |
<target name="generate-without-source" depends="init" description="generate the distribution without the source file" > |
115 |
|
116 |
|
117 |
|
118 |
|
119 |
<!-- Create the distribution directory -->
|
120 |
<delete dir="${without_src}"/> |
121 |
<mkdir dir="${without_src}"/> |
122 |
<mkdir dir="${without_src}/${mainplugin}/lib"/> |
123 |
<!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file -->
|
124 |
<jar jarfile="${without_src}/${mainplugin}/lib/${plugin}.jar" basedir="${build}"/> |
125 |
<copy file="config/config.xml" todir="${without_src}"/> |
126 |
<copy file="build.number" todir="${without_src}"/> |
127 |
<copy todir="${without_src}"> |
128 |
<fileset dir="config" includes="text*.properties"/> |
129 |
</copy>
|
130 |
<!--copy todir="${without_src}/${mainplugin}/lib"-->
|
131 |
<copy todir="${without_src}/${mainplugin}/lib"> |
132 |
<fileset dir="${lib}" includes="*.jar,*.zip"/> |
133 |
</copy>
|
134 |
<copy todir="${without_src}/images"> |
135 |
<fileset dir="images/" includes="*"/> |
136 |
</copy>
|
137 |
<copy todir="${without_src}/scripts"> |
138 |
<fileset dir="${scripts}" includes="**/**"/> |
139 |
</copy>
|
140 |
</target>
|
141 |
|
142 |
|
143 |
<target name="dist-without-source" depends="generate-without-source" description="make a zip file"> |
144 |
<move todir="${dist}/${mainplugin}/"> |
145 |
<fileset dir="${without_src}/${mainplugin}/"/> |
146 |
</move>
|
147 |
<move todir="${dist}/${plugin}/"> |
148 |
<fileset dir="${without_src}" includes="**/**"/> |
149 |
</move>
|
150 |
|
151 |
<zip destfile="./gvSIGScriptingPlugin.zip" |
152 |
basedir="${dist}" |
153 |
update="false"/> |
154 |
|
155 |
<delete dir="${dist}/${plugin}/"/> |
156 |
<delete dir="${dist}/${mainplugin}/"/> |
157 |
<move todir="${dist}/" file="./gvSIGScriptingPlugin.zip"/> |
158 |
|
159 |
</target>
|
160 |
|
161 |
|
162 |
|
163 |
<target name="install-extension" depends="generate-without-source" description="instal extension to andami directory"> |
164 |
<move todir="${extensionDir}/${mainplugin}/lib"> |
165 |
<fileset dir="${without_src}/${mainplugin}/lib" includes="*.jar,*.zip"/> |
166 |
</move>
|
167 |
<delete dir="${without_src}/${mainplugin}/lib"/> |
168 |
<delete dir="${without_src}/${mainplugin}"/> |
169 |
<move todir="${extensions-dir}/${plugin}/"> |
170 |
<fileset dir="${without_src}" includes="**/**"/> |
171 |
</move>
|
172 |
</target>
|
173 |
|
174 |
<target name="batch-build" |
175 |
description="compile the sources, create the jar file" |
176 |
depends="init,compile,create-jar,copy-data-files,copy-scripts,move-to-installDir"> |
177 |
</target>
|
178 |
|
179 |
<target name="compile" description="compile the source" > |
180 |
<!-- Compile the Java code from ${src} to ${build} -->
|
181 |
<mkdir dir="${build}" /> |
182 |
<javac srcdir="${src}" |
183 |
destdir="${build}" |
184 |
source="${JavaSourceVersion}" |
185 |
target="${JavaTargetVersion}" |
186 |
encoding="${encoding}" |
187 |
debug="${debug}" |
188 |
debuglevel="${debuglevel}" |
189 |
classpath="${compile-classpath}"/> |
190 |
</target>
|
191 |
|
192 |
<target name="create-jar" |
193 |
description="Creates the plugin jar"> |
194 |
<mkdir dir="${dist}"/> |
195 |
<jar jarfile="${dist}/${jarName}" basedir="${build}" /> |
196 |
</target>
|
197 |
|
198 |
<target name="copy-data-files"> |
199 |
<copy file="config/config.xml" todir="${dist}"/> |
200 |
<copy file="build.number" todir="${dist}"/> |
201 |
<copy todir="${dist}"> |
202 |
<fileset dir="config" includes="text*.properties"/> |
203 |
</copy>
|
204 |
<copy todir="${dist}/images"> |
205 |
<fileset dir="images/" includes="*"/> |
206 |
</copy>
|
207 |
</target>
|
208 |
|
209 |
<target name="copy-scripts"> |
210 |
<copy todir="${dist}/scripts"> |
211 |
<fileset dir="${scripts}" includes="**/**"/> |
212 |
</copy>
|
213 |
</target>
|
214 |
|
215 |
<target name="move-to-installDir"> |
216 |
<move todir="${installLibDir}"> |
217 |
<fileset dir="${dist}" includes="${jarName}"/> |
218 |
</move>
|
219 |
<move todir="${installDir}"> |
220 |
<fileset dir="${dist}" includes="**/**"/> |
221 |
</move>
|
222 |
<copy todir="${installLibDir}"> |
223 |
<fileset dir="${lib}" includes="**/**"/> |
224 |
</copy>
|
225 |
</target>
|
226 |
|
227 |
<target name="clean" |
228 |
description="clean up" > |
229 |
<!-- Delete the ${build} and ${dist} directory trees -->
|
230 |
<delete dir="${build}"/> |
231 |
<delete dir="${dist}"/> |
232 |
</target>
|
233 |
|
234 |
</project>
|