root / trunk / extensions / extDataLocator / build.xml @ 7738
History | View | Annotate | Download (5.27 KB)
1 |
<project name="Generar extension en Andami" default="generate-without-source" basedir="."> |
---|---|
2 |
<description>
|
3 |
Instala el plugin del Localizador por atributo en Andami. |
4 |
</description>
|
5 |
<!-- set global properties for this build -->
|
6 |
<property name="andami" location="../_fwAndami" /> |
7 |
<property name="extensionsDir" location="${andami}/gvSIG/extensiones"/> |
8 |
<property name="src" location="src"/> |
9 |
<property name="build" location="bin"/> |
10 |
<property name="doc" location="doc"/> |
11 |
<property name="dist" location="dist"/> |
12 |
<property name="without_src" location="without_src"/> |
13 |
<property name="plugin" value="com.iver.gvsig.datalocator"/> |
14 |
<property name="mainplugin" value="com.iver.cit.gvsig"/> |
15 |
<property name="fmapLibs" location="../libFMap/lib" /> |
16 |
<property name="andamiLibs" location="${andami}/lib" /> |
17 |
<property name="andamiJar" location="${andami}/andami.jar"/> |
18 |
<property name="gvsigJar" location="${extensionsDir}/${mainplugin}/lib/${mainplugin}.jar"/> |
19 |
<property name="compile-classpath" value="${andamiJar}:${gvsigJar}:${fmapLibs}/cms.jar:${fmapLibs}/driver-manager-1.1.jar:${fmapLibs}/fmap.jar:${fmapLibs}/gdbms-0.8-SNAPSHOT.jar:${andamiLibs}/iver-utiles.jar" /> |
20 |
|
21 |
<target name="init"> |
22 |
<!-- Create the time stamp -->
|
23 |
<tstamp/> |
24 |
</target>
|
25 |
|
26 |
<target name="dist" depends="init" |
27 |
description="generate the distribution" > |
28 |
<!-- Remove previous distribution directory -->
|
29 |
<delete dir="${dist}"/> |
30 |
<!-- Create the distribution directory structure -->
|
31 |
<mkdir dir="${dist}"/> |
32 |
<mkdir dir="${dist}/src"/> |
33 |
<mkdir dir="${dist}/doc"/> |
34 |
<mkdir dir="${dist}/bin"/> |
35 |
<mkdir dir="${dist}/bin/com"/> |
36 |
<mkdir dir="${dist}/bin/com/iver"/> |
37 |
<mkdir dir="${dist}/bin/com/iver/gvsig"/> |
38 |
<mkdir dir="${dist}/bin/com/iver/gvsig/datalocator"/> |
39 |
<mkdir dir="${dist}/bin/com/iver/gvsig/datalocator/images"/> |
40 |
<mkdir dir="${dist}/images"/> |
41 |
<mkdir dir="${dist}/config"/> |
42 |
<!-- Copy necessary distribution files to dist dir -->
|
43 |
<copy todir="${dist}/src"> |
44 |
<fileset dir="${src}"/> |
45 |
</copy>
|
46 |
<copy todir="${dist}/doc"> |
47 |
<fileset dir="${doc}"/> |
48 |
</copy>
|
49 |
<copy todir="${dist}/images"> |
50 |
<fileset dir="images"/> |
51 |
</copy>
|
52 |
<copy file="config/config.xml" todir="${dist}/config"/> |
53 |
<copy file="build.xml" todir="${dist}"/> |
54 |
<copy todir="${dist}"> |
55 |
<fileset dir="config" includes="text*.properties"/> |
56 |
</copy>
|
57 |
<!-- <copy todir="${dist}/bin/com/iver/gvsig/datalocator">
|
58 |
<fileset dir="." includes="text*.properties"/>
|
59 |
</copy> -->
|
60 |
<jar jarfile="${dist}/bin/com/iver/gvsig/datalocator/${plugin}.jar" basedir="${build}"/> |
61 |
<copy file="config/config.xml" todir="${dist}/bin/com/iver/gvsig/datalocator"/> |
62 |
<copy todir="${dist}/bin/com/iver/gvsig/datalocator/images"> |
63 |
<fileset dir="images"/> |
64 |
</copy>
|
65 |
<!-- Zip distribution -->
|
66 |
<zip destfile="${dist}/gvSIGDataLocatorPlugin.zip" |
67 |
basedir="${dist}" |
68 |
update="true" |
69 |
/>
|
70 |
</target>
|
71 |
|
72 |
<target name="clean-orig" |
73 |
description="clean dist directory" > |
74 |
<!-- Clean the distribution directory -->
|
75 |
<delete dir="${dist}/src"/> |
76 |
<delete dir="${dist}/doc"/> |
77 |
<delete dir="${dist}/bin"/> |
78 |
<delete dir="${dist}/images"/> |
79 |
<delete dir="${dist}/config"/> |
80 |
<delete file="${dist}/build.xml"/> |
81 |
<delete failonerror="false"> |
82 |
<fileset dir="${dist}" includes="**/*.properties"/> |
83 |
</delete>
|
84 |
</target>
|
85 |
|
86 |
<target name="generate-without-source" depends="clean-orig" description="generate the distribution without the source file" > |
87 |
<!-- Create the distribution directory -->
|
88 |
<mkdir dir="${without_src}"/> |
89 |
|
90 |
<!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file -->
|
91 |
<jar jarfile="${without_src}/${plugin}.jar" basedir="${build}"/> |
92 |
<copy file="config/config.xml" todir="${without_src}"/> |
93 |
<copy todir="${without_src}"> |
94 |
<fileset dir="config" includes="text*.properties"/> |
95 |
</copy>
|
96 |
<copy todir="${without_src}/images"> |
97 |
<fileset dir="images/" includes="*"/> |
98 |
</copy>
|
99 |
<move todir="${extensionsDir}/${plugin}/"> |
100 |
<fileset dir="${without_src}" includes="**/**"/> |
101 |
</move>
|
102 |
</target>
|
103 |
|
104 |
<target name="batch-build" |
105 |
description="compile the sources, create the jar file" |
106 |
depends="compile,create-jar,copy-data-files,move-to-andami"> |
107 |
</target>
|
108 |
|
109 |
<target name="compile" description="compile the source" > |
110 |
<!-- Compile the Java code from ${src} to ${build} -->
|
111 |
<mkdir dir="${build}" /> |
112 |
<javac srcdir="${src}" |
113 |
destdir="${build}" |
114 |
debug="${debug}" |
115 |
debuglevel="${debuglevel}" |
116 |
classpath="${compile-classpath}"/> |
117 |
</target>
|
118 |
|
119 |
<target name="create-jar" |
120 |
description="Creates the plugin jar"> |
121 |
<mkdir dir="${dist}"/> |
122 |
<jar jarfile="${dist}/${plugin}.jar" basedir="${build}"/> |
123 |
</target>
|
124 |
|
125 |
<target name="copy-data-files"> |
126 |
<copy file="config/config.xml" todir="${dist}"/> |
127 |
<copy todir="${dist}"> |
128 |
<fileset dir="config" includes="text*.properties"/> |
129 |
</copy>
|
130 |
<copy todir="${dist}/images"> |
131 |
<fileset dir="images/" includes="*"/> |
132 |
</copy>
|
133 |
</target>
|
134 |
|
135 |
<target name="move-to-andami"> |
136 |
<move todir="${extensionsDir}/${plugin}/"> |
137 |
<fileset dir="${dist}" includes="**/**"/> |
138 |
</move>
|
139 |
</target>
|
140 |
|
141 |
<target name="clean" |
142 |
description="clean up" > |
143 |
<!-- Delete the ${build} and ${dist} directory trees -->
|
144 |
<delete dir="${dist}"/> |
145 |
<delete dir="${build}"/> |
146 |
</target>
|
147 |
</project>
|
148 |
|