svn-gvsig-desktop / tags / v1_1_Build_1010 / extensions / extScripting / build.xml @ 12804
History | View | Annotate | Download (8.15 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 | 10565 | jmvivo | <property name="JavaSourceVersion" value="1.4"/> |
27 | <property name="JavaTargetVersion" value="1.4"/> |
||
28 | |||
29 | 5554 | jmvivo | <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 | 10185 | jmvivo | <target name="import-build-number"> |
37 | <copy todir="."> |
||
38 | <fileset file="${buildNumberFile}"/> |
||
39 | </copy>
|
||
40 | </target>
|
||
41 | |||
42 | 6358 | cesar | <target name="dist" depends="init" |
43 | 5554 | jmvivo | 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 | 5782 | jmvivo | <mkdir dir="${dist}/scripts"/> |
52 | 5554 | jmvivo | <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 | 5782 | jmvivo | <copy todir="${dist}/scripts"> |
70 | <fileset dir="${scripts}"/> |
||
71 | 5554 | jmvivo | </copy>
|
72 | <copy todir="${dist}/images"> |
||
73 | <fileset dir="images"/> |
||
74 | </copy>
|
||
75 | <copy file="config/config.xml" todir="${dist}/config"/> |
||
76 | 10185 | jmvivo | <copy file="build.number" todir="${dist}"/> |
77 | 5554 | jmvivo | <copy file="build.xml" todir="${dist}"/> |
78 | <copy todir="${dist}"> |
||
79 | 8765 | jjdelcerro | <fileset dir="config" includes="text*.properties"/> |
80 | 5554 | jmvivo | </copy>
|
81 | <copy todir="${dist}/bin/org/gvsig/scripting"> |
||
82 | 8765 | jjdelcerro | <fileset dir="config" includes="text*.properties"/> |
83 | 5554 | jmvivo | </copy>
|
84 | 6358 | cesar | <jar jarfile="${dist}/bin/org/gvsig/scripting/${plugin}.jar" basedir="${build}"/> |
85 | 9331 | jmvivo | <copy file="config/config.xml" todir="${dist}/bin/org/gvsig/scripting"/> |
86 | 10185 | jmvivo | <copy file="build.number" todir="${dist}/bin/org/gvsig/scripting"/> |
87 | 5554 | jmvivo | <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 | 6358 | cesar | <target name="clean-orig" depends="dist" |
98 | 5554 | jmvivo | description="clean dist directory" > |
99 | <!-- Clean the distribution directory -->
|
||
100 | <delete dir="${dist}/src"/> |
||
101 | 5596 | jmvivo | <delete dir="${dist}/lib"/> |
102 | 5554 | jmvivo | <delete dir="${dist}/doc"/> |
103 | <delete dir="${dist}/bin"/> |
||
104 | 5782 | jmvivo | <delete dir="${dist}/scripts"/> |
105 | 5554 | jmvivo | <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 | 6358 | cesar | <target name="generate-without-source" depends="init" description="generate the distribution without the source file" > |
114 | 9331 | jmvivo | |
115 | |||
116 | |||
117 | |||
118 | 5554 | jmvivo | <!-- Create the distribution directory -->
|
119 | 5596 | jmvivo | <delete dir="${without_src}"/> |
120 | <mkdir dir="${without_src}"/> |
||
121 | 9331 | jmvivo | <mkdir dir="${without_src}/${mainplugin}/lib"/> |
122 | 5554 | jmvivo | <!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file -->
|
123 | 9331 | jmvivo | <jar jarfile="${without_src}/${mainplugin}/lib/${plugin}.jar" basedir="${build}"/> |
124 | 5554 | jmvivo | <copy file="config/config.xml" todir="${without_src}"/> |
125 | 10185 | jmvivo | <copy file="build.number" todir="${without_src}"/> |
126 | 5554 | jmvivo | <copy todir="${without_src}"> |
127 | 8765 | jjdelcerro | <fileset dir="config" includes="text*.properties"/> |
128 | 5554 | jmvivo | </copy>
|
129 | 9331 | jmvivo | <!--copy todir="${without_src}/${mainplugin}/lib"-->
|
130 | 5596 | jmvivo | <copy todir="${without_src}/${mainplugin}/lib"> |
131 | 5554 | jmvivo | <fileset dir="${lib}" includes="*.jar,*.zip"/> |
132 | </copy>
|
||
133 | <copy todir="${without_src}/images"> |
||
134 | <fileset dir="images/" includes="*"/> |
||
135 | </copy>
|
||
136 | 5782 | jmvivo | <copy todir="${without_src}/scripts"> |
137 | <fileset dir="${scripts}" includes="**/**"/> |
||
138 | 5596 | jmvivo | </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 | 5910 | jmvivo | <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 | 5554 | jmvivo | <move todir="${extensions-dir}/${plugin}/"> |
169 | <fileset dir="${without_src}" includes="**/**"/> |
||
170 | </move>
|
||
171 | </target>
|
||
172 | |||
173 | 6358 | cesar | <target name="batch-build" |
174 | description="compile the sources, create the jar file" |
||
175 | 8765 | jjdelcerro | depends="init,compile,create-jar,copy-data-files,copy-scripts,move-to-installDir"> |
176 | 6358 | cesar | </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 | 10565 | jmvivo | source="${JavaSourceVersion}" |
184 | target="${JavaTargetVersion}" |
||
185 | 6358 | cesar | 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 | 10185 | jmvivo | <copy file="build.number" todir="${dist}"/> |
199 | 6358 | cesar | <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 | 9331 | jmvivo | <move todir="${installLibDir}"> |
215 | <fileset dir="${dist}" includes="${jarName}"/> |
||
216 | </move>
|
||
217 | 6358 | cesar | <move todir="${installDir}"> |
218 | <fileset dir="${dist}" includes="**/**"/> |
||
219 | </move>
|
||
220 | 9331 | jmvivo | <copy todir="${installLibDir}"> |
221 | 6358 | cesar | <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 | 5554 | jmvivo | </project> |