svn-gvsig-desktop / trunk / examples / exaExampleCenterViewToPoint / build.xml @ 11728
History | View | Annotate | Download (6.03 KB)
1 |
<project name="extCenterViewToPoint" default="generate-without-source" basedir="."> |
---|---|
2 |
<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="${GVSIG_HOME}/bin/gvSIG/extensiones"/> |
7 |
<property name="src" location="src"/> |
8 |
<property name="build" location="bin"/> |
9 |
<property name="doc" location="doc"/> |
10 |
<property name="dist" location="dist"/> |
11 |
<property name="without_src" location="without_src"/> |
12 |
<property name="plugin" value="com.iver.gvsig.centerviewpoint"/> |
13 |
<property name="jarName" value="com.iver.gvsig.centerviewpoint.jar"/> |
14 |
<property name="andami" location="${GVSIG_HOME}/bin"/> |
15 |
<property name="andamiLibs" location="${GVSIG_HOME}/bin/libs" /> |
16 |
<property name="mainPlugin" location="${extensions-dir}/com.iver.cit.gvsig/lib/com.iver.cit.gvsig.jar"/> |
17 |
<property name="compile-classpath" value="${andami}/andami.jar:${andamiLibs}/beans.jar:${fmapLibs}/cms.jar:${fmapLibs}/fmap.jar:${mainPlugin}"/> |
18 |
<property name="installBaseDir" location="${andami}"/> |
19 |
<property name="installDir" location="${installBaseDir}/gvSIG/extensiones/${plugin}"/> |
20 |
<property name="JavaSourceVersion" value="1.4"/> |
21 |
<property name="JavaTargetVersion" value="1.4"/> |
22 |
|
23 |
<target name="init"> |
24 |
<!-- Create the time stamp -->
|
25 |
<tstamp/> |
26 |
<echo>
|
27 |
Compiling ${ant.project.name}...</echo>
|
28 |
</target>
|
29 |
|
30 |
<target name="dist" depends="init" |
31 |
description="generate the distribution" > |
32 |
<!-- Remove previous distribution directory -->
|
33 |
<delete dir="${dist}"/> |
34 |
<!-- Create the distribution directory structure -->
|
35 |
<mkdir dir="${dist}"/> |
36 |
<mkdir dir="${dist}/src"/> |
37 |
<mkdir dir="${dist}/doc"/> |
38 |
<mkdir dir="${dist}/bin"/> |
39 |
<mkdir dir="${dist}/bin/com"/> |
40 |
<mkdir dir="${dist}/bin/com/iver"/> |
41 |
<mkdir dir="${dist}/bin/com/iver/gvsig"/> |
42 |
<mkdir dir="${dist}/bin/com/iver/gvsig/centerviewpoint"/> |
43 |
<mkdir dir="${dist}/bin/com/iver/gvsig/centerviewpoint/images"/> |
44 |
<mkdir dir="${dist}/images"/> |
45 |
<mkdir dir="${dist}/config"/> |
46 |
<!-- Copy necessary distribution files to dist dir -->
|
47 |
<copy todir="${dist}/src"> |
48 |
<fileset dir="${src}"/> |
49 |
</copy>
|
50 |
<!--copy todir="${dist}/doc">
|
51 |
<fileset dir="${doc}"/>
|
52 |
</copy-->
|
53 |
<copy todir="${dist}/images"> |
54 |
<fileset dir="images"/> |
55 |
</copy>
|
56 |
<copy file="config/config.xml" todir="${dist}/config"/> |
57 |
<copy file="build.number" todir="${dist}"/> |
58 |
<copy file="build.xml" todir="${dist}"/> |
59 |
<copy todir="${dist}"> |
60 |
<fileset dir="config" includes="text*.properties"/> |
61 |
</copy>
|
62 |
<copy todir="${dist}/bin/com/iver/gvsig/centerviewpoint"> |
63 |
<fileset dir="config" includes="text*.properties"/> |
64 |
</copy>
|
65 |
<jar jarfile="${dist}/bin/com/iver/gvsig/centerviewpoint/${plugin}.jar" basedir="${build}"/> |
66 |
<copy file="config/config.xml" todir="${dist}/bin/com/iver/gvsig/centerviewtopoint"/> |
67 |
<copy file="build.number" todir="${dist}/bin/com/iver/gvsig/centerviewtopoint"/> |
68 |
<copy todir="${dist}/bin/com/iver/gvsig/centerviewpoint/images"> |
69 |
<fileset dir="images"/> |
70 |
</copy>
|
71 |
<!-- Zip distribution -->
|
72 |
<zip destfile="${dist}/gvSIGCenterViewToPointPlugin.zip" |
73 |
basedir="${dist}" |
74 |
update="true" |
75 |
/>
|
76 |
</target>
|
77 |
|
78 |
<target name="import-build-number"> |
79 |
<copy todir="."> |
80 |
<fileset file="${buildNumberFile}"/> |
81 |
</copy>
|
82 |
</target>
|
83 |
|
84 |
|
85 |
<target name="clean" |
86 |
description="clean dist directory" > |
87 |
<!-- Clean the distribution directory -->
|
88 |
<delete dir="${dist}/src" failonerror="false"/> |
89 |
<delete dir="${dist}/doc" failonerror="false"/> |
90 |
<delete dir="${dist}/bin" failonerror="false"/> |
91 |
<delete dir="${dist}/images" failonerror="false"/> |
92 |
<delete dir="${dist}/config" failonerror="false"/> |
93 |
<delete file="${dist}/build.xml" failonerror="false"/> |
94 |
<delete failonerror="false"> |
95 |
<fileset dir="${dist}" includes="**/*.properties"/> |
96 |
</delete>
|
97 |
</target>
|
98 |
|
99 |
<target name="generate-without-source" depends="clean" description="generate the distribution without the source file" > |
100 |
<!-- Create the distribution directory -->
|
101 |
<mkdir dir="${without_src}"/> |
102 |
<mkdir dir="${without_src}/lib"/> |
103 |
<mkdir dir="${without_src}/theme"/> |
104 |
<!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file -->
|
105 |
<jar jarfile="${without_src}/lib/${plugin}.jar" basedir="${build}"/> |
106 |
<copy file="config/config.xml" todir="${without_src}"/> |
107 |
<copy file="config/about.htm" todir="${without_src}"/> |
108 |
<copy file="build.number" todir="${without_src}"/> |
109 |
<copy todir="${without_src}"> |
110 |
<fileset dir="config" includes="text*.properties"/> |
111 |
</copy>
|
112 |
<copy todir="${without_src}/theme"> |
113 |
<fileset dir="theme/" includes="*"/> |
114 |
</copy>
|
115 |
<copy todir="${without_src}/images"> |
116 |
<fileset dir="images/" includes="*"/> |
117 |
</copy>
|
118 |
<move todir="${extensions-dir}/${plugin}/"> |
119 |
<fileset dir="${without_src}" includes="**/**"/> |
120 |
</move>
|
121 |
</target>
|
122 |
|
123 |
|
124 |
<target name="batch-build" |
125 |
description="compile the sources, create the jar file" |
126 |
depends="init,compile,create-jar,copy-data-files,move-to-installDir"> |
127 |
</target>
|
128 |
|
129 |
<target name="compile" description="compile the source" > |
130 |
<!-- Compile the Java code from ${src} to ${build} -->
|
131 |
<mkdir dir="${build}" /> |
132 |
<javac srcdir="${src}" |
133 |
destdir="${build}" |
134 |
source="${JavaSourceVersion}" |
135 |
target="${JavaTargetVersion}" |
136 |
debug="${debug}" |
137 |
debuglevel="${debuglevel}" |
138 |
classpath="${compile-classpath}"/> |
139 |
</target>
|
140 |
|
141 |
<target name="create-jar" |
142 |
description="Creates the plugin jar"> |
143 |
<mkdir dir="${dist}"/> |
144 |
<jar jarfile="${dist}/${jarName}" basedir="${build}" /> |
145 |
</target>
|
146 |
|
147 |
<target name="copy-data-files"> |
148 |
<copy file="config/config.xml" todir="${dist}"/> |
149 |
<copy file="build.number" todir="${dist}"/> |
150 |
<copy todir="${dist}"> |
151 |
<fileset dir="config" includes="text*.properties"/> |
152 |
</copy>
|
153 |
<copy todir="${dist}/images"> |
154 |
<fileset dir="images/" includes="*"/> |
155 |
</copy>
|
156 |
</target>
|
157 |
|
158 |
<target name="move-to-installDir"> |
159 |
<move todir="${installDir}"> |
160 |
<fileset dir="${dist}" includes="**/**"/> |
161 |
</move>
|
162 |
</target>
|
163 |
|
164 |
</project>
|
165 |
|