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