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