Statistics
| Revision:

svn-gvsig-desktop / branches / v10 / extensions / extAddEventTheme / build.xml @ 12479

History | View | Annotate | Download (6 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
          <!-- 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
        <property name="mainplugin" value="com.iver.cit.gvsig" />
17
        <property name="gvsigJar" location="${extensionsDir}/${mainplugin}/lib/${mainplugin}.jar"/>
18
        <property name="andamiLibs" location="${andami}/lib"/>
19
        <property name="fmapLibs" location="../libFMap/lib" />
20
        <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
        <property name="JavaSourceVersion" value="1.4"/>
22
        <property name="JavaTargetVersion" value="1.4"/>
23
        <property name="encoding" value="ISO_8859_1"/>
24

    
25
        <target name="init">
26
                <!-- Create the time stamp -->
27
                <tstamp/>
28
                <echo>
29
                        Compiling ${ant.project.name}...
30
                </echo>
31
        </target>
32
        
33
  <target name="import-build-number">
34
          <copy todir=".">
35
                  <fileset file="${buildNumberFile}"/>
36
          </copy>
37
  </target>
38

    
39
  <target name="dist" depends="init"
40
        description="generate the distribution" >
41
    <!-- Remove previous distribution directory -->
42
    <delete dir="${dist}"/>
43
    <!-- Create the distribution directory structure -->
44
    <mkdir dir="${dist}"/>
45
    <!-- <mkdir dir="${dist}/src"/> -->
46
    <!-- <mkdir dir="${dist}/doc"/> -->
47
    <mkdir dir="${dist}/bin"/>
48
    <mkdir dir="${dist}/bin/com"/>
49
    <mkdir dir="${dist}/bin/com/iver"/>
50
    <mkdir dir="${dist}/bin/com/iver/gvsig"/>
51
    <mkdir dir="${dist}/bin/com/iver/gvsig/addeventtheme"/>
52
    <mkdir dir="${dist}/bin/com/iver/gvsig/addeventtheme/images"/>
53
    <mkdir dir="${dist}/images"/>
54
    <mkdir dir="${dist}/config"/>
55
    <!-- Copy necessary distribution files to dist dir -->
56
    <copy todir="${dist}/src">
57
      <fileset dir="${src}"/>
58
    </copy>
59
    <!-- <copy todir="${dist}/doc">
60
      <fileset dir="${doc}"/>
61
    </copy> -->
62
    <copy todir="${dist}/images">
63
      <fileset dir="images"/>
64
    </copy>
65
    <copy file="config/config.xml" todir="${dist}/config"/>
66
          <copy file="build.number" todir="${dist}"/>
67
    <copy file="build.xml" todir="${dist}"/>
68
    <copy todir="${dist}">
69
            <fileset dir="config" includes="text*.properties"/>
70
    </copy>
71
    <copy todir="${dist}/bin/com/iver/gvsig/addeventtheme">
72
            <fileset dir="config" includes="text*.properties"/>
73
    </copy>
74
    <jar jarfile="${dist}/bin/com/iver/gvsig/addeventtheme/${plugin}.jar" basedir="${build}"/>
75
    <copy file="config/config.xml" todir="${dist}/bin/com/iver/gvsig/addeventtheme"/>
76
          <copy file="build.number" todir="${dist}/bin/com/iver/gvsig/addeventtheme"/>
77
    <copy todir="${dist}/bin/com/iver/gvsig/addeventtheme/images">
78
      <fileset dir="images"/>
79
    </copy>
80
    <!-- Zip distribution -->
81
    <zip destfile="${dist}/gvSIGAddEventThemePlugin.zip"
82
         basedir="${dist}"
83
         update="true"
84
    />
85
  </target>
86
        
87
  <target name="generate-without-source" depends="clean-orig" description="generate the distribution without the source file" >
88
    <!-- Create the distribution directory -->
89
    <mkdir dir="${without_src}"/>
90

    
91
    <!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file -->
92
    <jar jarfile="${without_src}/${plugin}.jar" basedir="${build}"/>
93
    <copy file="config/config.xml" todir="${without_src}"/>
94
          <copy file="build.number" todir="${without_src}"/>
95
    <copy todir="${without_src}">
96
            <fileset dir="config" includes="text*.properties"/>
97
    </copy>
98
    <copy todir="${without_src}/images">
99
            <fileset dir="images/" includes="*"/>
100
    </copy>
101
          <!-- jar file must be in gvSIG/lib directory -->
102
          <move file="${without_src}/${plugin}.jar" todir="${lib-dir}"/>
103
    <move todir="${extensionsDir}/${plugin}/">
104
            <fileset dir="${without_src}" includes="**/**"/>
105
    </move>
106
  </target>
107
        
108
        <target name="batch-build"
109
                        description="compile the sources, create the jar file"
110
                        depends="init,compile,create-jar,copy-data-files,move-to-andami">
111
        </target>
112

    
113
        <target name="compile" description="compile the source" >
114
                <!-- Compile the Java code from ${src} to ${build} -->
115
                <mkdir dir="${build}" />
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
        </target>
126
        
127
        <target name="create-jar"
128
                        description="Creates the plugin jar">
129
                <mkdir dir="${dist}"/>
130
            <jar jarfile="${dist}/${plugin}.jar" basedir="${build}"/>
131
        </target>
132
        
133
        <target name="copy-data-files">                
134
                <copy file="config/config.xml" todir="${dist}"/>
135
                <copy file="build.number" todir="${dist}"/>
136
                <copy todir="${dist}">
137
                        <fileset dir="config" includes="text*.properties"/>
138
                </copy>
139
                <copy todir="${dist}/images">
140
                        <fileset dir="images/" includes="*"/>
141
                </copy>
142
        </target>
143
        
144
        <target name="move-to-andami">
145
                  <!-- jar file must be in gvSIG/lib directory -->
146
                  <move file="${dist}/${plugin}.jar" todir="${lib-dir}"/>
147
            <move todir="${extensionsDir}/${plugin}/">
148
                    <fileset dir="${dist}" includes="**/**"/>
149
            </move>
150
        </target>
151
        
152
        <target name="clean"
153
                        description="clean up">
154
                <!-- Delete the ${build} and ${dist} directory trees -->
155
                <delete dir="${build}" />
156
                <delete dir="${dist}" />
157
        </target>
158

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