Statistics
| Revision:

root / tags / v1_0_2_Build_897 / extensions / extAddEventTheme / build.xml @ 34034

History | View | Annotate | Download (5.8 KB)

1 8765 jjdelcerro
<project name="extAddEventTheme" default="generate-without-source" basedir=".">
2 3525 caballero
    <description>
3
        Instala el plugin de AƱadir tema de eventos en Andami.
4
    </description>
5 4916 cesar
          <!-- set global properties for this build -->
6
        <property name="lib-dir" location="../_fwAndami/gvSIG/extensiones/com.iver.cit.gvsig/lib" />
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.addeventtheme"/>
13
        <property name="andami" value="../_fwAndami"/>
14
        <property name="extensionsDir" location="${andami}/gvSIG/extensiones"/>
15
        <property name="andamiJar" location="${andami}/andami.jar"/>
16 5606 cesar
        <property name="mainplugin" value="com.iver.cit.gvsig" />
17
        <property name="gvsigJar" location="${extensionsDir}/${mainplugin}/lib/${mainplugin}.jar"/>
18 4916 cesar
        <property name="andamiLibs" location="${andami}/lib"/>
19
        <property name="fmapLibs" location="../libFMap/lib" />
20 6280 cesar
        <property name="compile-classpath" value="${gvsigJar}:${andamiJar}:${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"/>
21 8765 jjdelcerro
22 4916 cesar
        <target name="init">
23
                <!-- Create the time stamp -->
24
                <tstamp/>
25 8765 jjdelcerro
                <echo>
26
                        Compiling ${ant.project.name}...
27
                </echo>
28 4916 cesar
        </target>
29 10185 jmvivo
30
  <target name="import-build-number">
31
          <copy todir=".">
32
                  <fileset file="${buildNumberFile}"/>
33
          </copy>
34
  </target>
35 3525 caballero
36
  <target name="dist" depends="init"
37
        description="generate the distribution" >
38
    <!-- Remove previous distribution directory -->
39
    <delete dir="${dist}"/>
40
    <!-- Create the distribution directory structure -->
41
    <mkdir dir="${dist}"/>
42 6891 fjp
    <!-- <mkdir dir="${dist}/src"/> -->
43
    <!-- <mkdir dir="${dist}/doc"/> -->
44 3525 caballero
    <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/addeventtheme"/>
49
    <mkdir dir="${dist}/bin/com/iver/gvsig/addeventtheme/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 6891 fjp
    <!-- <copy todir="${dist}/doc">
57 3525 caballero
      <fileset dir="${doc}"/>
58 6891 fjp
    </copy> -->
59 3525 caballero
    <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 3525 caballero
    <copy file="build.xml" todir="${dist}"/>
65
    <copy todir="${dist}">
66 5611 cesar
            <fileset dir="config" includes="text*.properties"/>
67 3525 caballero
    </copy>
68
    <copy todir="${dist}/bin/com/iver/gvsig/addeventtheme">
69 5611 cesar
            <fileset dir="config" includes="text*.properties"/>
70 3525 caballero
    </copy>
71 4916 cesar
    <jar jarfile="${dist}/bin/com/iver/gvsig/addeventtheme/${plugin}.jar" basedir="${build}"/>
72 3525 caballero
    <copy file="config/config.xml" todir="${dist}/bin/com/iver/gvsig/addeventtheme"/>
73 10185 jmvivo
          <copy file="build.number" todir="${dist}/bin/com/iver/gvsig/addeventtheme"/>
74 3525 caballero
    <copy todir="${dist}/bin/com/iver/gvsig/addeventtheme/images">
75
      <fileset dir="images"/>
76
    </copy>
77
    <!-- Zip distribution -->
78
    <zip destfile="${dist}/gvSIGAddEventThemePlugin.zip"
79
         basedir="${dist}"
80
         update="true"
81
    />
82
  </target>
83
84 4916 cesar
  <target name="generate-without-source" depends="clean-orig" description="generate the distribution without the source file" >
85 3525 caballero
    <!-- Create the distribution directory -->
86
    <mkdir dir="${without_src}"/>
87
88
    <!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file -->
89 4916 cesar
    <jar jarfile="${without_src}/${plugin}.jar" basedir="${build}"/>
90 3525 caballero
    <copy file="config/config.xml" todir="${without_src}"/>
91 10185 jmvivo
          <copy file="build.number" todir="${without_src}"/>
92 3525 caballero
    <copy todir="${without_src}">
93 5611 cesar
            <fileset dir="config" includes="text*.properties"/>
94 3525 caballero
    </copy>
95
    <copy todir="${without_src}/images">
96
            <fileset dir="images/" includes="*"/>
97
    </copy>
98
          <!-- jar file must be in gvSIG/lib directory -->
99 8765 jjdelcerro
          <move file="${without_src}/${plugin}.jar" todir="${lib-dir}"/>
100 4916 cesar
    <move todir="${extensionsDir}/${plugin}/">
101 3525 caballero
            <fileset dir="${without_src}" includes="**/**"/>
102
    </move>
103
  </target>
104 4916 cesar
105
        <target name="batch-build"
106
                        description="compile the sources, create the jar file"
107 8765 jjdelcerro
                        depends="init,compile,create-jar,copy-data-files,move-to-andami">
108 4916 cesar
        </target>
109 3525 caballero
110 4916 cesar
        <target name="compile" description="compile the source" >
111
                <!-- Compile the Java code from ${src} to ${build} -->
112
                <mkdir dir="${build}" />
113
                <javac  srcdir="${src}"
114
                        destdir="${build}"
115
                        classpath="${compile-classpath}"
116 7776 cesar
                        source="1.4"
117
                        target="1.4"
118 6296 cesar
                        debug="${debug}"
119
                        debuglevel="${debuglevel}"
120 4916 cesar
                        excludes="test/**"/>
121
        </target>
122
123
        <target name="create-jar"
124
                        description="Creates the plugin jar">
125
                <mkdir dir="${dist}"/>
126
            <jar jarfile="${dist}/${plugin}.jar" basedir="${build}"/>
127
        </target>
128
129 10185 jmvivo
        <target name="copy-data-files">
130 4916 cesar
                <copy file="config/config.xml" todir="${dist}"/>
131 10185 jmvivo
                <copy file="build.number" todir="${dist}"/>
132 4916 cesar
                <copy todir="${dist}">
133 5611 cesar
                        <fileset dir="config" includes="text*.properties"/>
134 4916 cesar
                </copy>
135
                <copy todir="${dist}/images">
136
                        <fileset dir="images/" includes="*"/>
137
                </copy>
138
        </target>
139
140
        <target name="move-to-andami">
141
                  <!-- jar file must be in gvSIG/lib directory -->
142 8765 jjdelcerro
                  <move file="${dist}/${plugin}.jar" todir="${lib-dir}"/>
143 4916 cesar
            <move todir="${extensionsDir}/${plugin}/">
144
                    <fileset dir="${dist}" includes="**/**"/>
145
            </move>
146
        </target>
147
148
        <target name="clean"
149
                        description="clean up">
150
                <!-- Delete the ${build} and ${dist} directory trees -->
151
                <delete dir="${build}" />
152
                <delete dir="${dist}" />
153
        </target>
154
155 6891 fjp
        <target name="clean-orig"
156 4916 cesar
                        description="clean dist directory" >
157
            <!-- Clean the distribution directory -->
158 6891 fjp
            <delete dir="${dist}"/>
159 4916 cesar
        </target>
160 3525 caballero
</project>