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