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