Statistics
| Revision:

root / branches / v10 / extensions / extDataLocator / build.xml @ 13997

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