svn-gvsig-desktop / tags / gvsig_sextante-0_3_0-1232 / extensions / extScripting / build.xml @ 31434
History | View | Annotate | Download (8.01 KB)
1 | 13559 | caballero | <project name="extScripting" default="install" basedir="."> |
---|---|---|---|
2 | 5554 | jmvivo | <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 | 6358 | cesar | <property name="build" location="bin"/> |
9 | 13477 | cesar | <property name="src-test" location="src-test"/> |
10 | <property name="build-test" location="bin-test"/> |
||
11 | 5554 | jmvivo | <property name="doc" location="doc"/> |
12 | 13126 | jmvivo | <property name="scripts" location="scripts"/> |
13 | 5554 | jmvivo | <property name="dist" location="dist"/> |
14 | <property name="lib" location="lib"/> |
||
15 | <property name="extensionDir" location="../_fwAndami/gvSIG/extensiones"/> |
||
16 | 9215 | fdiaz | <property name="mainplugin" value="com.iver.cit.gvsig"/> |
17 | 5554 | jmvivo | <property name="without_src" location="without_src"/> |
18 | <property name="plugin" value="org.gvsig.scripting"/> |
||
19 | 9215 | fdiaz | <property name="jarName" value="${plugin}.jar"/> |
20 | <property name="andami" location="../_fwAndami"/> |
||
21 | <property name="andamiLibs" location="${andami}/lib"/> |
||
22 | 9329 | jmvivo | <property name="fmap" location="../libFMap"/> |
23 | <property name="fmapLibs" location="${fmap}/lib"/> |
||
24 | 9215 | fdiaz | <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 | 13236 | jmvivo | <import file="../binaries/ant/utilities.xml"/> |
28 | 5554 | jmvivo | |
29 | <target name="init"> |
||
30 | <!-- Create the time stamp -->
|
||
31 | <tstamp/> |
||
32 | 7213 | cesar | <echo>
|
33 | Compiling ${ant.project.name}...</echo>
|
||
34 | 5554 | jmvivo | </target>
|
35 | |||
36 | 6358 | cesar | <target name="dist" depends="init" |
37 | 5554 | jmvivo | 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 | 5782 | jmvivo | <mkdir dir="${dist}/scripts"/> |
46 | 5554 | jmvivo | <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 | 13126 | jmvivo | </copy>
|
60 | 5554 | jmvivo | <copy todir="${dist}/doc"> |
61 | <fileset dir="${doc}"/> |
||
62 | </copy>
|
||
63 | 5782 | jmvivo | <copy todir="${dist}/scripts"> |
64 | <fileset dir="${scripts}"/> |
||
65 | 13126 | jmvivo | </copy>
|
66 | 5554 | jmvivo | <copy todir="${dist}/images"> |
67 | <fileset dir="images"/> |
||
68 | </copy>
|
||
69 | <copy file="config/config.xml" todir="${dist}/config"/> |
||
70 | 10187 | jmvivo | <copy file="build.number" todir="${dist}"/> |
71 | 5554 | jmvivo | <copy file="build.xml" todir="${dist}"/> |
72 | <copy todir="${dist}"> |
||
73 | 8286 | jmvivo | <fileset dir="config" includes="text*.properties"/> |
74 | 5554 | jmvivo | </copy>
|
75 | <copy todir="${dist}/bin/org/gvsig/scripting"> |
||
76 | 8286 | jmvivo | <fileset dir="config" includes="text*.properties"/> |
77 | 5554 | jmvivo | </copy>
|
78 | 6358 | cesar | <jar jarfile="${dist}/bin/org/gvsig/scripting/${plugin}.jar" basedir="${build}"/> |
79 | 9215 | fdiaz | <copy file="config/config.xml" todir="${dist}/bin/org/gvsig/scripting"/> |
80 | 10187 | jmvivo | <copy file="build.number" todir="${dist}/bin/org/gvsig/scripting"/> |
81 | 5554 | jmvivo | <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 | 6358 | cesar | <target name="clean-orig" depends="dist" |
92 | 5554 | jmvivo | description="clean dist directory" > |
93 | <!-- Clean the distribution directory -->
|
||
94 | <delete dir="${dist}/src"/> |
||
95 | 5596 | jmvivo | <delete dir="${dist}/lib"/> |
96 | 5554 | jmvivo | <delete dir="${dist}/doc"/> |
97 | <delete dir="${dist}/bin"/> |
||
98 | 5782 | jmvivo | <delete dir="${dist}/scripts"/> |
99 | 5554 | jmvivo | <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 | 13126 | jmvivo | |
107 | 6358 | cesar | <target name="generate-without-source" depends="init" description="generate the distribution without the source file" > |
108 | 13126 | jmvivo | |
109 | 5554 | jmvivo | <!-- Create the distribution directory -->
|
110 | 5596 | jmvivo | <delete dir="${without_src}"/> |
111 | <mkdir dir="${without_src}"/> |
||
112 | 9215 | fdiaz | <mkdir dir="${without_src}/${mainplugin}/lib"/> |
113 | 5554 | jmvivo | <!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file -->
|
114 | 9215 | fdiaz | <jar jarfile="${without_src}/${mainplugin}/lib/${plugin}.jar" basedir="${build}"/> |
115 | 5554 | jmvivo | <copy file="config/config.xml" todir="${without_src}"/> |
116 | 10187 | jmvivo | <copy file="build.number" todir="${without_src}"/> |
117 | 5554 | jmvivo | <copy todir="${without_src}"> |
118 | 8286 | jmvivo | <fileset dir="config" includes="text*.properties"/> |
119 | 5554 | jmvivo | </copy>
|
120 | 9215 | fdiaz | <!--copy todir="${without_src}/${mainplugin}/lib"-->
|
121 | 5596 | jmvivo | <copy todir="${without_src}/${mainplugin}/lib"> |
122 | 5554 | jmvivo | <fileset dir="${lib}" includes="*.jar,*.zip"/> |
123 | </copy>
|
||
124 | <copy todir="${without_src}/images"> |
||
125 | <fileset dir="images/" includes="*"/> |
||
126 | </copy>
|
||
127 | 5782 | jmvivo | <copy todir="${without_src}/scripts"> |
128 | <fileset dir="${scripts}" includes="**/**"/> |
||
129 | 5596 | jmvivo | </copy>
|
130 | </target>
|
||
131 | 13126 | jmvivo | |
132 | |||
133 | <target name="dist-without-source" depends="generate-without-source" description="make a zip file"> |
||
134 | 5596 | jmvivo | <move todir="${dist}/${mainplugin}/"> |
135 | <fileset dir="${without_src}/${mainplugin}/"/> |
||
136 | 13126 | jmvivo | </move>
|
137 | 5596 | jmvivo | <move todir="${dist}/${plugin}/"> |
138 | <fileset dir="${without_src}" includes="**/**"/> |
||
139 | </move>
|
||
140 | 13126 | jmvivo | |
141 | <zip destfile="./gvSIGScriptingPlugin.zip" |
||
142 | 5596 | jmvivo | basedir="${dist}" |
143 | update="false"/> |
||
144 | 13126 | jmvivo | |
145 | 5596 | jmvivo | <delete dir="${dist}/${plugin}/"/> |
146 | <delete dir="${dist}/${mainplugin}/"/> |
||
147 | <move todir="${dist}/" file="./gvSIGScriptingPlugin.zip"/> |
||
148 | |||
149 | </target>
|
||
150 | |||
151 | |||
152 | 13126 | jmvivo | |
153 | 5596 | jmvivo | <target name="install-extension" depends="generate-without-source" description="instal extension to andami directory"> |
154 | 5910 | jmvivo | <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 | 5554 | jmvivo | <move todir="${extensions-dir}/${plugin}/"> |
160 | <fileset dir="${without_src}" includes="**/**"/> |
||
161 | </move>
|
||
162 | </target>
|
||
163 | |||
164 | 6358 | cesar | <target name="batch-build" |
165 | description="compile the sources, create the jar file" |
||
166 | 8286 | jmvivo | depends="init,compile,create-jar,copy-data-files,copy-scripts,move-to-installDir"> |
167 | 6358 | cesar | </target>
|
168 | |||
169 | 13559 | caballero | <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 | 6358 | cesar | <target name="compile" description="compile the source" > |
175 | <!-- Compile the Java code from ${src} to ${build} -->
|
||
176 | 13296 | jmvivo | <antcall target="gvSIG-import-build-number"/> |
177 | 6358 | cesar | <mkdir dir="${build}" /> |
178 | 13126 | jmvivo | <loadEclipseClasspath project="${basedir}"/> |
179 | 13296 | jmvivo | <gvSIG-javac
|
180 | 13204 | jmvivo | classpath="${eclipseClasspath}" |
181 | />
|
||
182 | 6358 | cesar | </target>
|
183 | 13126 | jmvivo | |
184 | 6358 | cesar | <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 | 10187 | jmvivo | <copy file="build.number" todir="${dist}"/> |
193 | 6358 | cesar | <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 | 13126 | jmvivo | |
201 | 6358 | cesar | <target name="copy-scripts"> |
202 | <copy todir="${dist}/scripts"> |
||
203 | <fileset dir="${scripts}" includes="**/**"/> |
||
204 | </copy>
|
||
205 | </target>
|
||
206 | 13126 | jmvivo | |
207 | 6358 | cesar | <target name="move-to-installDir"> |
208 | 9238 | jmvivo | <move todir="${installLibDir}"> |
209 | <fileset dir="${dist}" includes="${jarName}"/> |
||
210 | </move>
|
||
211 | 6358 | cesar | <move todir="${installDir}"> |
212 | <fileset dir="${dist}" includes="**/**"/> |
||
213 | </move>
|
||
214 | 9238 | jmvivo | <copy todir="${installLibDir}"> |
215 | 6358 | cesar | <fileset dir="${lib}" includes="**/**"/> |
216 | </copy>
|
||
217 | </target>
|
||
218 | 13126 | jmvivo | |
219 | 6358 | cesar | <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 | 13477 | cesar | <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 | 5554 | jmvivo | </project> |