svn-gvsig-desktop / tags / gvsig_topologia-0_1_0-1233 / extensions / extTopology / build.xml @ 44492
History | View | Annotate | Download (6.91 KB)
1 | 16996 | azabala | <!--REHACERLO PARA QUE SE COPIEN BIEN LAS LIBRERIAS-->
|
---|---|---|---|
2 | |||
3 | 21276 | azabala | <project name="Topology" default="generate-without-source" basedir="."> |
4 | 16996 | azabala | <description>
|
5 | Instala el plugin de Topologia en Andami. |
||
6 | </description>
|
||
7 | |||
8 | <property name="src" location="src"/> |
||
9 | <property name="build" location="bin"/> |
||
10 | <property name="src-test" location="src-test"/> |
||
11 | <property name="build-test" location="bin-test"/> |
||
12 | <property name="doc" location="doc"/> |
||
13 | <property name="dist" location="dist"/> |
||
14 | <property name="without_src" location="without_src"/> |
||
15 | <property name="plugin" value="org.gvsig.topology"/> |
||
16 | |||
17 | |||
18 | <property name="lib" value="lib"/> |
||
19 | <property name="andami" value="../_fwAndami"/> |
||
20 | <property name="jarName" value="${plugin}.jar"/> |
||
21 | <property name="extensionsDir" location="${andami}/gvSIG/extensiones"/> |
||
22 | 21276 | azabala | <property name="docsGeoprocessDir" location="${extensionsDir}/${plugin}/docs"/> |
23 | 16996 | azabala | <property name="andamiJar" location="${andami}/andami.jar"/> |
24 | <property name="gvsigJar" location="${extensionsDir}/com.iver.cit.gvsig/lib/com.iver.cit.gvsig.jar"/> |
||
25 | <property name="andamiLibs" location="${andami}/lib"/> |
||
26 | <property name="fmapLibs" location="../libFMap/lib" /> |
||
27 | <property name="fmapJar" location="../libFMap/dist/lib/fmap.jar"/> |
||
28 | <import file="../binaries/ant/utilities.xml"/> |
||
29 | |||
30 | <target name="init"> |
||
31 | <!-- Create the time stamp -->
|
||
32 | <tstamp/> |
||
33 | <echo>
|
||
34 | Compiling ${ant.project.name}...</echo>
|
||
35 | </target>
|
||
36 | |||
37 | <target name="dist" depends="init" |
||
38 | description="generate the distribution" > |
||
39 | <!-- Remove previous distribution directory -->
|
||
40 | <delete dir="${dist}"/> |
||
41 | <!-- Create the distribution directory structure -->
|
||
42 | <mkdir dir="${dist}"/> |
||
43 | <mkdir dir="${dist}/bin"/> |
||
44 | <mkdir dir="${dist}/bin/org"/> |
||
45 | <mkdir dir="${dist}/bin/org/gvsig"/> |
||
46 | <mkdir dir="${dist}/bin/org/gvsig/topology"/> |
||
47 | <mkdir dir="${dist}/bin/org/gvsig/topology/images"/> |
||
48 | <mkdir dir="${dist}/images"/> |
||
49 | <mkdir dir="${dist}/config"/> |
||
50 | 21276 | azabala | <mkdir dir="${dist}/config/docs"/> |
51 | 16996 | azabala | <mkdir dir="${dist}/lib"/> |
52 | <!-- Copy necessary distribution files to dist dir -->
|
||
53 | <copy todir="${dist}/images"> |
||
54 | <fileset dir="images"/> |
||
55 | </copy>
|
||
56 | <copy todir="${dist}/lib"> |
||
57 | <fileset dir="lib" includes="*.*"/> |
||
58 | </copy>
|
||
59 | <copy file="config/config.xml" todir="${dist}/config"/> |
||
60 | <copy file="build.number" todir="${dist}"/> |
||
61 | <copy file="build.xml" todir="${dist}"/> |
||
62 | <copy todir="${dist}"> |
||
63 | <fileset dir="config" includes="text*.properties"/> |
||
64 | </copy>
|
||
65 | <jar jarfile="${dist}/bin/org/gvsig/topology/${plugin}.jar" basedir="${build}"/> |
||
66 | <copy file="config/config.xml" todir="${dist}/bin/org/gvsig/topology"/> |
||
67 | <copy file="build.number" todir="${dist}/bin/org/gvsig/topology"/> |
||
68 | <copy todir="${dist}/bin/org/gvsig/topology/images"> |
||
69 | <fileset dir="images"/> |
||
70 | </copy>
|
||
71 | 21276 | azabala | <copy todir="${dist}/docs"> |
72 | <fileset dir="config/docs" includes="**/*.*"/> |
||
73 | </copy>
|
||
74 | 16996 | azabala | </target>
|
75 | |||
76 | <target name="clean-orig" |
||
77 | description="clean dist directory" > |
||
78 | <!-- Clean the distribution directory -->
|
||
79 | <delete dir="${dist}" /> |
||
80 | </target>
|
||
81 | |||
82 | <target name="generate-without-source" |
||
83 | depends="clean-orig" |
||
84 | description="generate the distribution without the source file" > |
||
85 | |||
86 | <!-- Create the distribution directory -->
|
||
87 | <mkdir dir="${without_src}"/> |
||
88 | <mkdir dir="${without_src}/lib"/> |
||
89 | 21276 | azabala | <mkdir dir="${without_src}/docs"/> |
90 | 16996 | azabala | <!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file -->
|
91 | <jar jarfile="${without_src}/lib/${plugin}.jar" basedir="${build}"/> |
||
92 | <copy file="config/config.xml" todir="${without_src}"/> |
||
93 | <copy file="build.number" todir="${without_src}"/> |
||
94 | 29403 | yhijazi | |
95 | <copy file="config/about.htm" todir="${without_src}"/> |
||
96 | <loadproperties srcFile="build.number"/> |
||
97 | <replace casesensitive="true" |
||
98 | file="${without_src}/about.htm" |
||
99 | token="#build.number#" |
||
100 | value="${build.number}"/> |
||
101 | |||
102 | 16996 | azabala | |
103 | <copy todir="${without_src}"> |
||
104 | <fileset dir="config" includes="text*.properties"/> |
||
105 | </copy>
|
||
106 | |||
107 | 21276 | azabala | |
108 | 16996 | azabala | <copy todir="${without_src}/docs"> |
109 | <fileset dir="config/docs" includes="**/*.*"/> |
||
110 | </copy>
|
||
111 | |||
112 | 21276 | azabala | <!--
|
113 | 16996 | azabala | <copy todir="${without_src}/lib">
|
114 | <fileset dir="lib" includes="*.*"/>
|
||
115 | </copy>
|
||
116 | -->
|
||
117 | <copy todir="${without_src}/images"> |
||
118 | <fileset dir="images/" includes="*"/> |
||
119 | </copy>
|
||
120 | |||
121 | <move todir="${extensionsDir}/${plugin}/"> |
||
122 | <fileset dir="${without_src}" includes="**/**"/> |
||
123 | </move>
|
||
124 | </target>
|
||
125 | |||
126 | |||
127 | <target name="batch-build" |
||
128 | description="compile the sources, create the jar file" |
||
129 | depends="init,compile,create-jar,copy-data-files,copy-libs,move-to-andami"> |
||
130 | </target>
|
||
131 | |||
132 | <target name="compile" description="compile the source" > |
||
133 | 29403 | yhijazi | <!-- <antcall target="gvSIG-import-build-number"/> -->
|
134 | 16996 | azabala | <!-- Compile the Java code from ${src} to ${build} -->
|
135 | <mkdir dir="${build}" /> |
||
136 | <loadEclipseClasspath project="${basedir}"/> |
||
137 | <gvSIG-javac
|
||
138 | classpath="${eclipseClasspath}" |
||
139 | />
|
||
140 | |||
141 | <copy todir="${build}"> |
||
142 | <fileset dir="${src}" excludes="**/*.java" casesensitive="false"/> |
||
143 | </copy>
|
||
144 | </target>
|
||
145 | |||
146 | <target name="create-jar" |
||
147 | description="Creates the plugin jar"> |
||
148 | <mkdir dir="${dist}/lib"/> |
||
149 | <jar jarfile="${dist}/lib/${jarName}" basedir="${build}"/> |
||
150 | </target>
|
||
151 | |||
152 | <target name="copy-data-files"> |
||
153 | <copy file="config/config.xml" todir="${dist}"/> |
||
154 | <copy file="build.number" todir="${dist}"/> |
||
155 | 29403 | yhijazi | <copy file="config/about.htm" todir="${dist}"/> |
156 | <loadproperties srcFile="build.number"/> |
||
157 | <replace casesensitive="true" |
||
158 | file="${dist}/about.htm" |
||
159 | token="#build.number#" |
||
160 | value="${build.number}"/> |
||
161 | 16996 | azabala | <copy todir="${dist}"> |
162 | <fileset dir="config" includes="text*.properties"/> |
||
163 | </copy>
|
||
164 | <copy todir="${dist}/images"> |
||
165 | <fileset dir="images/" includes="*"/> |
||
166 | </copy>
|
||
167 | <copy todir="${dist}/docs"> |
||
168 | <fileset dir="config/docs" includes="**/*.*"/> |
||
169 | </copy>
|
||
170 | </target>
|
||
171 | |||
172 | <target name="copy-libs"> |
||
173 | <copy todir="${dist}/lib"> |
||
174 | <fileset dir="lib" includes="*.*"/> |
||
175 | </copy>
|
||
176 | </target>
|
||
177 | |||
178 | <target name="move-to-andami"> |
||
179 | <move todir="${extensionsDir}/${plugin}/"> |
||
180 | <fileset dir="${dist}" includes="**/**"/> |
||
181 | </move>
|
||
182 | </target>
|
||
183 | |||
184 | <target name="clean" |
||
185 | description="clean up" > |
||
186 | <delete dir="${build}"/> |
||
187 | <delete dir="${dist}"/> |
||
188 | </target>
|
||
189 | |||
190 | <target name="run-tests" depends="batch-build,compile-tests"> |
||
191 | <antcall target="generic-run-tests"> |
||
192 | <param name="TestSuite.Name" value="com.iver.cit.gvsig.geoprocess.AllTests"/> |
||
193 | </antcall>
|
||
194 | </target>
|
||
195 | |||
196 | 29403 | yhijazi | <target name="buildNumber"> |
197 | <propertyfile file="build.number" |
||
198 | comment="Build Number for ANT. Do not edit!"> |
||
199 | 30581 | yhijazi | <entry key="build.number" default="0" type="int" operation="+" pattern="0"/> |
200 | 29403 | yhijazi | </propertyfile>
|
201 | <property file="build.number" /> |
||
202 | </target>
|
||
203 | |||
204 | <target name="distribution" |
||
205 | depends="buildNumber,generate-without-source"/> |
||
206 | |||
207 | 16996 | azabala | </project>
|