svn-gvsig-desktop / tags / v1_0_2_Build_895 / extensions / extScripting / build.xml @ 47840
History | View | Annotate | Download (8.01 KB)
1 | 9331 | jmvivo | <project name="extScripting" default="batch-build" 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 | 5554 | jmvivo | <property name="doc" location="doc"/> |
10 | 5782 | jmvivo | <property name="scripts" location="scripts"/> |
11 | 5554 | jmvivo | <property name="dist" location="dist"/> |
12 | <property name="lib" location="lib"/> |
||
13 | <property name="extensionDir" location="../_fwAndami/gvSIG/extensiones"/> |
||
14 | 9331 | jmvivo | <property name="mainplugin" value="com.iver.cit.gvsig"/> |
15 | 5554 | jmvivo | <property name="without_src" location="without_src"/> |
16 | <property name="plugin" value="org.gvsig.scripting"/> |
||
17 | 9331 | jmvivo | <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 | 9586 | jmvivo | <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 | 5554 | jmvivo | |
27 | <target name="init"> |
||
28 | <!-- Create the time stamp -->
|
||
29 | <tstamp/> |
||
30 | 7213 | cesar | <echo>
|
31 | Compiling ${ant.project.name}...</echo>
|
||
32 | 5554 | jmvivo | </target>
|
33 | |||
34 | 10185 | jmvivo | <target name="import-build-number"> |
35 | <copy todir="."> |
||
36 | <fileset file="${buildNumberFile}"/> |
||
37 | </copy>
|
||
38 | </target>
|
||
39 | |||
40 | 6358 | cesar | <target name="dist" depends="init" |
41 | 5554 | jmvivo | 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 | 5782 | jmvivo | <mkdir dir="${dist}/scripts"/> |
50 | 5554 | jmvivo | <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 | 5782 | jmvivo | <copy todir="${dist}/scripts"> |
68 | <fileset dir="${scripts}"/> |
||
69 | 5554 | jmvivo | </copy>
|
70 | <copy todir="${dist}/images"> |
||
71 | <fileset dir="images"/> |
||
72 | </copy>
|
||
73 | <copy file="config/config.xml" todir="${dist}/config"/> |
||
74 | 10185 | jmvivo | <copy file="build.number" todir="${dist}"/> |
75 | 5554 | jmvivo | <copy file="build.xml" todir="${dist}"/> |
76 | <copy todir="${dist}"> |
||
77 | 8765 | jjdelcerro | <fileset dir="config" includes="text*.properties"/> |
78 | 5554 | jmvivo | </copy>
|
79 | <copy todir="${dist}/bin/org/gvsig/scripting"> |
||
80 | 8765 | jjdelcerro | <fileset dir="config" includes="text*.properties"/> |
81 | 5554 | jmvivo | </copy>
|
82 | 6358 | cesar | <jar jarfile="${dist}/bin/org/gvsig/scripting/${plugin}.jar" basedir="${build}"/> |
83 | 9331 | jmvivo | <copy file="config/config.xml" todir="${dist}/bin/org/gvsig/scripting"/> |
84 | 10185 | jmvivo | <copy file="build.number" todir="${dist}/bin/org/gvsig/scripting"/> |
85 | 5554 | jmvivo | <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 | 6358 | cesar | <target name="clean-orig" depends="dist" |
96 | 5554 | jmvivo | description="clean dist directory" > |
97 | <!-- Clean the distribution directory -->
|
||
98 | <delete dir="${dist}/src"/> |
||
99 | 5596 | jmvivo | <delete dir="${dist}/lib"/> |
100 | 5554 | jmvivo | <delete dir="${dist}/doc"/> |
101 | <delete dir="${dist}/bin"/> |
||
102 | 5782 | jmvivo | <delete dir="${dist}/scripts"/> |
103 | 5554 | jmvivo | <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 | 6358 | cesar | <target name="generate-without-source" depends="init" description="generate the distribution without the source file" > |
112 | 9331 | jmvivo | |
113 | |||
114 | |||
115 | |||
116 | 5554 | jmvivo | <!-- Create the distribution directory -->
|
117 | 5596 | jmvivo | <delete dir="${without_src}"/> |
118 | <mkdir dir="${without_src}"/> |
||
119 | 9331 | jmvivo | <mkdir dir="${without_src}/${mainplugin}/lib"/> |
120 | 5554 | jmvivo | <!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file -->
|
121 | 9331 | jmvivo | <jar jarfile="${without_src}/${mainplugin}/lib/${plugin}.jar" basedir="${build}"/> |
122 | 5554 | jmvivo | <copy file="config/config.xml" todir="${without_src}"/> |
123 | 10185 | jmvivo | <copy file="build.number" todir="${without_src}"/> |
124 | 5554 | jmvivo | <copy todir="${without_src}"> |
125 | 8765 | jjdelcerro | <fileset dir="config" includes="text*.properties"/> |
126 | 5554 | jmvivo | </copy>
|
127 | 9331 | jmvivo | <!--copy todir="${without_src}/${mainplugin}/lib"-->
|
128 | 5596 | jmvivo | <copy todir="${without_src}/${mainplugin}/lib"> |
129 | 5554 | jmvivo | <fileset dir="${lib}" includes="*.jar,*.zip"/> |
130 | </copy>
|
||
131 | <copy todir="${without_src}/images"> |
||
132 | <fileset dir="images/" includes="*"/> |
||
133 | </copy>
|
||
134 | 5782 | jmvivo | <copy todir="${without_src}/scripts"> |
135 | <fileset dir="${scripts}" includes="**/**"/> |
||
136 | 5596 | jmvivo | </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 | 5910 | jmvivo | <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 | 5554 | jmvivo | <move todir="${extensions-dir}/${plugin}/"> |
167 | <fileset dir="${without_src}" includes="**/**"/> |
||
168 | </move>
|
||
169 | </target>
|
||
170 | |||
171 | 6358 | cesar | <target name="batch-build" |
172 | description="compile the sources, create the jar file" |
||
173 | 8765 | jjdelcerro | depends="init,compile,create-jar,copy-data-files,copy-scripts,move-to-installDir"> |
174 | 6358 | cesar | </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 | 7776 | cesar | source="1.4" |
182 | target="1.4" |
||
183 | 6358 | cesar | 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 | 10185 | jmvivo | <copy file="build.number" todir="${dist}"/> |
197 | 6358 | cesar | <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 | 9331 | jmvivo | <move todir="${installLibDir}"> |
213 | <fileset dir="${dist}" includes="${jarName}"/> |
||
214 | </move>
|
||
215 | 6358 | cesar | <move todir="${installDir}"> |
216 | <fileset dir="${dist}" includes="**/**"/> |
||
217 | </move>
|
||
218 | 9331 | jmvivo | <copy todir="${installLibDir}"> |
219 | 6358 | cesar | <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 | 5554 | jmvivo | </project> |