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