Statistics
| Revision:

root / trunk / extensions / extDataLocator / build.xml @ 11445

History | View | Annotate | Download (5.76 KB)

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