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