Statistics
| Revision:

root / trunk / extensions / extAddEventTheme / build.xml @ 13881

History | View | Annotate | Download (6.39 KB)

1
<project name="extAddEventTheme" default="generate-without-source" basedir=".">
2
    <description>
3
        Instala el plugin de AƱadir tema de eventos en Andami.
4
    </description>
5
        <import file="../binaries/ant/utilities.xml"/>
6
          <!-- set global properties for this build -->
7
        <property name="lib-dir" location="../_fwAndami/gvSIG/extensiones/com.iver.cit.gvsig/lib" />
8
        <property name="src" location="src"/>
9
        <property name="build" location="bin"/>
10
        <property name="src-test" location="src-test"/>
11
        <property name="build-test" location="bin-test"/>
12
        <property name="doc"  location="doc"/>
13
        <property name="dist"  location="dist"/>
14
        <property name="without_src"  location="without_src"/>
15
        <property name="plugin" value="com.iver.gvsig.addeventtheme"/>
16
        <property name="andami" value="../_fwAndami"/>
17
        <property name="extensionsDir" location="${andami}/gvSIG/extensiones"/>
18
        <property name="andamiJar" location="${andami}/andami.jar"/>
19
        <property name="mainplugin" value="com.iver.cit.gvsig" />
20
        <property name="gvsigJar" location="${extensionsDir}/${mainplugin}/lib/${mainplugin}.jar"/>
21
        <property name="fmapJar" location="../libFMap/dist/lib/fmap.jar"/>
22
        <property name="andamiLibs" location="${andami}/lib"/>
23
        <property name="fmapLibs" location="../libFMap/lib" />
24
        <!--<property name="compile-classpath" value="${gvsigJar}:${andamiJar}:${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"/>-->
25

    
26
        <target name="init">
27
                <!-- Create the time stamp -->
28
                <tstamp/>
29
                <echo>
30
                        Compiling ${ant.project.name}...
31
                </echo>
32
        </target>
33

    
34
  <target name="dist" depends="init"
35
        description="generate the distribution" >
36
    <!-- Remove previous distribution directory -->
37
    <delete dir="${dist}"/>
38
    <!-- Create the distribution directory structure -->
39
    <mkdir dir="${dist}"/>
40
    <!-- <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/addeventtheme"/>
47
    <mkdir dir="${dist}/bin/com/iver/gvsig/addeventtheme/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
          <copy file="build.number" todir="${dist}"/>
62
    <copy file="build.xml" todir="${dist}"/>
63
    <copy todir="${dist}">
64
            <fileset dir="config" includes="text*.properties"/>
65
    </copy>
66
    <copy todir="${dist}/bin/com/iver/gvsig/addeventtheme">
67
            <fileset dir="config" includes="text*.properties"/>
68
    </copy>
69
    <jar jarfile="${dist}/bin/com/iver/gvsig/addeventtheme/${plugin}.jar" basedir="${build}"/>
70
    <copy file="config/config.xml" todir="${dist}/bin/com/iver/gvsig/addeventtheme"/>
71
          <copy file="build.number" todir="${dist}/bin/com/iver/gvsig/addeventtheme"/>
72
    <copy todir="${dist}/bin/com/iver/gvsig/addeventtheme/images">
73
      <fileset dir="images"/>
74
    </copy>
75
    <!-- Zip distribution -->
76
    <zip destfile="${dist}/gvSIGAddEventThemePlugin.zip"
77
         basedir="${dist}"
78
         update="true"
79
    />
80
  </target>
81

    
82
  <target name="generate-without-source" depends="clean-orig" description="generate the distribution without the source file" >
83
    <!-- Create the distribution directory -->
84
    <mkdir dir="${without_src}"/>
85

    
86
    <!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file -->
87
    <jar jarfile="${without_src}/${plugin}.jar" basedir="${build}"/>
88
    <copy file="config/config.xml" todir="${without_src}"/>
89
          <copy file="build.number" todir="${without_src}"/>
90
    <copy todir="${without_src}">
91
            <fileset dir="config" includes="text*.properties"/>
92
    </copy>
93
    <copy todir="${without_src}/images">
94
            <fileset dir="images/" includes="*"/>
95
    </copy>
96
          <!-- jar file must be in gvSIG/lib directory -->
97
          <move file="${without_src}/${plugin}.jar" todir="${lib-dir}"/>
98
    <move todir="${extensionsDir}/${plugin}/">
99
            <fileset dir="${without_src}" includes="**/**"/>
100
    </move>
101
  </target>
102

    
103
        <target name="batch-build"
104
                        description="compile the sources, create the jar file"
105
                        depends="init,compile,create-jar,copy-data-files,move-to-andami">
106
        </target>
107

    
108
        <target name="compile" description="compile the source" >
109
                <!-- Compile the Java code from ${src} to ${build} -->
110
                <antcall target="gvSIG-import-build-number"/>
111
                <mkdir dir="${build}" />
112
                <loadEclipseClasspath project="${basedir}"/>
113
                <gvSIG-javac
114
                        classpath="${eclipseClasspath}"
115
                        excludes="test/**"/>
116
                <!--<javac  srcdir="${src}"
117
                        destdir="${build}"
118
                        classpath="${compile-classpath}"
119
                        source="${JavaSourceVersion}"
120
                        target="${JavaTargetVersion}"
121
                        debug="${debug}"
122
                        debuglevel="${debuglevel}"
123
                        excludes="test/**"
124
                        encoding="${encoding}"/>
125
                        -->
126
        </target>
127

    
128
        <target name="create-jar"
129
                        description="Creates the plugin jar">
130
                <mkdir dir="${dist}"/>
131
            <jar jarfile="${dist}/${plugin}.jar" basedir="${build}"/>
132
        </target>
133

    
134
        <target name="copy-data-files">
135
                <antcall target="gvSIG-import-build-number"/>
136
                <copy file="config/config.xml" todir="${dist}"/>
137
                <copy file="build.number" todir="${dist}"/>
138
                <copy todir="${dist}">
139
                        <fileset dir="config" includes="text*.properties"/>
140
                </copy>
141
                <copy todir="${dist}/images">
142
                        <fileset dir="images/" includes="*"/>
143
                </copy>
144
        </target>
145

    
146
        <target name="move-to-andami">
147
                  <!-- jar file must be in gvSIG/lib directory -->
148
                  <move file="${dist}/${plugin}.jar" todir="${lib-dir}"/>
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="${build}" />
158
                <delete dir="${dist}" />
159
        </target>
160

    
161
        <target name="clean-orig"
162
                        description="clean dist directory" >
163
            <!-- Clean the distribution directory -->
164
            <delete dir="${dist}"/>
165
        </target>
166

    
167
        <target name="run-tests" depends="batch-build,compile-tests">
168
                <antcall target="generic-run-tests">
169
                        <param name="TestSuite.Name" value="com.iver.gvsig.addeventtheme.AllTests"/>
170
                </antcall>
171
        </target>
172
</project>