Statistics
| Revision:

svn-gvsig-desktop / tags / v1_0_2_Build_905 / extensions / extDataLocator / build.xml @ 34060

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