Statistics
| Revision:

svn-gvsig-desktop / tags / v1_0_2_Build_898 / extensions / extDataLocator / build.xml @ 38629

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