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