root / tags / v1_0_2_Build_916 / extensions / extDwg / build.xml @ 12327
History | View | Annotate | Download (5.3 KB)
1 |
<project name="extDwgPlugin" default="generate-without-source" basedir="."> |
---|---|
2 |
<description>
|
3 |
Carga en gvSIG el driver de DWG y genera una distribuciĆ³n |
4 |
</description>
|
5 |
<!-- set global properties for this build -->
|
6 |
<property name="src" location="src"/> |
7 |
<property name="build" location="bin"/> |
8 |
<property name="doc" location="doc"/> |
9 |
<property name="lib" location="lib"/> |
10 |
<property name="dist" location="dist"/> |
11 |
<property name="jarName" value="dwg"/> |
12 |
<property name="fmapLibs" location="../libFMap/lib"/> |
13 |
<property name="andami" location="../_fwAndami"/> |
14 |
<property name="andamiJar" location="${andami}/andami.jar" /> |
15 |
<property name="andamiLibs" location="${andami}/lib"/> |
16 |
<property name="mainPlugin" location="${andami}/gvSIG/extensiones/com.iver.cit.gvsig" /> |
17 |
<property name="drivers-dir" location="${mainPlugin}/drivers" /> |
18 |
<property name="lib-dir" description="The main plugin's library dir" location="${mainPlugin}/lib" /> |
19 |
<property name="translationsTargetDir" location="${build}/com/iver/cit/gvsig/drivers/dwg/resources/translations" /> |
20 |
<property name="fmapJar" location="${lib-dir}/fmap.jar"/> |
21 |
<property name="compile-classpath" value="${andamiJar}:${lib-dir}/cms.jar:${lib-dir}/com.iver.cit.gvsig.jar:${fmapJar}:${lib}/jdwglib.jar:${fmapLibs}/driver-manager-1.1.jar:${fmapLibs}/gdbms-0.8-SNAPSHOT.jar:${andamiLibs}/gvsig-i18n.jar"/> |
22 |
|
23 |
<property name="plugin" value="com.iver.cit.gvsig.dwg"/> |
24 |
<property name="extension-dir" location="../_fwAndami/gvSIG/extensiones"/> |
25 |
<property name="mainPlugin" value="com.iver.cit.gvsig" /> |
26 |
|
27 |
<property name="JavaSourceVersion" value="1.4"/> |
28 |
<property name="JavaTargetVersion" value="1.4"/> |
29 |
|
30 |
<target name="init"> |
31 |
<!-- Create the time stamp -->
|
32 |
<tstamp/> |
33 |
<echo>
|
34 |
Compiling ${ant.project.name}...</echo>
|
35 |
</target>
|
36 |
|
37 |
|
38 |
<target name="clean-orig" depends="generate-with-source" |
39 |
description="clean dist directory" > |
40 |
|
41 |
<delete dir="${dist}/src"/> |
42 |
<delete dir="${dist}/doc"/> |
43 |
<delete dir="${dist}/bin"/> |
44 |
<delete dir="${dist}/lib"/> |
45 |
</target>
|
46 |
|
47 |
|
48 |
<target name="generate-without-source" depends="init,copy-data-files,create-jar,move-to-andami" |
49 |
description="Carga el driver de DWG en Andami"> |
50 |
</target>
|
51 |
|
52 |
<target name="generate-with-source" depends="generate-without-source" |
53 |
description="generate the distribution" > |
54 |
<!-- Remove previous distribution directory -->
|
55 |
<delete dir="${dist}"/> |
56 |
<!-- Create the distribution directory structure -->
|
57 |
<mkdir dir="${dist}"/> |
58 |
<mkdir dir="${dist}/src"/> |
59 |
<mkdir dir="${dist}/doc"/> |
60 |
<mkdir dir="${dist}/lib"/> |
61 |
<mkdir dir="${dist}/bin"/> |
62 |
<!-- Copy necessary distribution files to dist dir -->
|
63 |
<copy todir="${dist}/src"> |
64 |
<fileset dir="${src}"/> |
65 |
</copy>
|
66 |
<copy todir="${dist}/doc"> |
67 |
<fileset dir="${doc}"/> |
68 |
</copy>
|
69 |
<copy todir="${dist}/lib"> |
70 |
<fileset dir="${lib}"/> |
71 |
</copy>
|
72 |
<mkdir dir="${translationsTargetDir}" /> |
73 |
<copy todir="${translationsTargetDir}"> |
74 |
<fileset dir="config" includes="*" /> |
75 |
</copy>
|
76 |
<mkdir dir="${dist}/bin/dwg" /> |
77 |
<jar jarfile="${dist}/bin/dwg/${jarName}.jar" basedir="${build}" /> |
78 |
|
79 |
|
80 |
<!-- Zip distribution -->
|
81 |
<zip destfile="${dist}/gvSIGDwgPlugin.zip" |
82 |
basedir="${dist}" |
83 |
update="true" |
84 |
/>
|
85 |
</target>
|
86 |
|
87 |
<target name="batch-build" |
88 |
description="compile the sources, create the jar file" |
89 |
depends="init,compile,copy-data-files,create-jar,move-to-andami"> |
90 |
</target>
|
91 |
|
92 |
|
93 |
<target name="copy-data-files"> |
94 |
<mkdir dir="config"/> |
95 |
<copy todir="${translationsTargetDir}"> |
96 |
<fileset dir="config" includes="*" /> |
97 |
</copy>
|
98 |
</target>
|
99 |
<target name="compile" description="compile the source" > |
100 |
<!-- Compile the Java code from ${src} to ${build} -->
|
101 |
<mkdir dir="${build}" /> |
102 |
<javac srcdir="${src}" |
103 |
destdir="${build}" |
104 |
source="${JavaSourceVersion}" |
105 |
target="${JavaTargetVersion}" |
106 |
debug="${debug}" |
107 |
debuglevel="${debuglevel}" |
108 |
classpath="${compile-classpath}"/> |
109 |
</target>
|
110 |
|
111 |
<target name="create-jar" |
112 |
description="Creates the plugin jar"> |
113 |
<mkdir dir="${dist}"/> |
114 |
<copy file="config/config.xml" todir="${dist}"/> |
115 |
<copy todir="${dist}"> |
116 |
<fileset dir="config/" includes="text*.properties"/> |
117 |
</copy>
|
118 |
<copy todir="${dist}/images"> |
119 |
<fileset dir="images/" includes="*"/> |
120 |
</copy>
|
121 |
|
122 |
<jar jarfile="${dist}/${jarName}.jar" |
123 |
basedir="${build}" excludes="com/iver/cit/gvsig/drivers/dwg/debug/**" /> |
124 |
|
125 |
<jar jarfile="${dist}/${plugin}.jar" |
126 |
basedir="${build}" |
127 |
includes="com/iver/cit/**" /> |
128 |
<!--
|
129 |
<jar jarfile="${dist}/${plugin}.jar"
|
130 |
basedir="${build}"
|
131 |
includes="com/iver/cit/gvsig/drivers/dwg/debug/**" />
|
132 |
-->
|
133 |
|
134 |
|
135 |
|
136 |
</target>
|
137 |
|
138 |
<target name="move-to-andami"> |
139 |
<copy todir="${drivers-dir}/dwg/" file="${dist}/${jarName}.jar"/> |
140 |
|
141 |
<!-- necessary to copy jdwglib.jar -->
|
142 |
<copy todir="${lib-dir}"> |
143 |
<fileset dir="${lib}"/> |
144 |
</copy>
|
145 |
|
146 |
<copy todir="${extension-dir}/${plugin}/"> |
147 |
<fileset dir="${dist}"> |
148 |
<exclude name="**/**.jar"/> |
149 |
<include name="**/**"/> |
150 |
</fileset>
|
151 |
</copy>
|
152 |
<!--
|
153 |
Movemos el jar al main-plugin
|
154 |
-->
|
155 |
<copy todir="${extension-dir}/${plugin}/" |
156 |
file="${dist}/${plugin}.jar"/> |
157 |
|
158 |
</target>
|
159 |
|
160 |
<target name="clean" |
161 |
description="clean up"> |
162 |
<!-- Delete the ${build} and ${dist} directory trees -->
|
163 |
<delete dir="${build}" /> |
164 |
<delete dir="${dist}" /> |
165 |
</target>
|
166 |
|
167 |
</project>
|