Statistics
| Revision:

root / trunk / extensions / extDataLocator / build.xml @ 2491

History | View | Annotate | Download (3.66 KB)

1
<project name="Generar extension en Andami" default="generate-without-source" basedir=".">
2
    <description>
3
        Instala el plugin del Localizador por atributo en Andami.
4
    </description>
5
  <!-- set global properties for this build -->
6
          <property name="extensions-dir" location="../Andami/gvSIG/extensiones"/>
7
  <property name="src" location="src"/>
8
  <property name="bin" 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.datalocator"/>
13

    
14
  <target name="init">
15
    <!-- Create the time stamp -->
16
    <tstamp/>
17
  </target>
18

    
19
  <!--target name="compile" depends="init"
20
                description="compile the source" -->
21
    <!-- Compile the Java code from ${src} to ${bin} -->
22
    <!--javac srcdir="${src}" destdir="${bin}"/-->
23
  <!--/target-->
24

    
25
  <target name="dist" depends="init"
26
        description="generate the distribution" >
27
    <!-- Remove previous distribution directory -->
28
    <delete dir="${dist}"/>
29
    <!-- Create the distribution directory structure -->
30
    <mkdir dir="${dist}"/>
31
    <mkdir dir="${dist}/src"/>
32
    <mkdir dir="${dist}/doc"/>
33
    <mkdir dir="${dist}/bin"/>
34
    <mkdir dir="${dist}/bin/com"/>
35
    <mkdir dir="${dist}/bin/com/iver"/>
36
    <mkdir dir="${dist}/bin/com/iver/gvsig"/>
37
    <mkdir dir="${dist}/bin/com/iver/gvsig/datalocator"/>
38
    <mkdir dir="${dist}/bin/com/iver/gvsig/datalocator/images"/>
39
    <mkdir dir="${dist}/images"/>
40
    <mkdir dir="${dist}/config"/>
41
    <!-- Copy necessary distribution files to dist dir -->
42
    <copy todir="${dist}/src">
43
      <fileset dir="${src}"/>
44
    </copy>
45
    <copy todir="${dist}/doc">
46
      <fileset dir="${doc}"/>
47
    </copy>
48
    <copy todir="${dist}/images">
49
      <fileset dir="images"/>
50
    </copy>
51
    <copy file="config/config.xml" todir="${dist}/config"/>
52
    <copy file="build.xml" todir="${dist}"/>
53
    <copy todir="${dist}">
54
            <fileset dir="." includes="text*.properties"/>
55
    </copy>
56
    <copy todir="${dist}/bin/com/iver/gvsig/datalocator">
57
            <fileset dir="." includes="text*.properties"/>
58
    </copy>
59
    <jar jarfile="${dist}/bin/com/iver/gvsig/datalocator/${plugin}.jar" basedir="${bin}"/>
60
    <copy file="config/config.xml" todir="${dist}/bin/com/iver/gvsig/datalocator"/>
61
    <copy todir="${dist}/bin/com/iver/gvsig/datalocator/images">
62
      <fileset dir="images"/>
63
    </copy>
64
    <!-- Zip distribution -->
65
    <zip destfile="${dist}/gvSIGDataLocatorPlugin.zip"
66
         basedir="${dist}"
67
         update="true"
68
    />
69
  </target>
70

    
71
  <target name="clean" depends="dist"
72
                description="clean dist directory" >
73
    <!-- Clean the distribution directory -->
74
    <delete dir="${dist}/src"/>
75
    <delete dir="${dist}/doc"/>
76
    <delete dir="${dist}/bin"/>
77
    <delete dir="${dist}/images"/>
78
    <delete dir="${dist}/config"/>
79
          <delete file="${dist}/build.xml"/>
80
          <delete>
81
        <fileset dir="${dist}" includes="**/*.properties"/>
82
    </delete>
83
  </target>
84
        
85
  <target name="generate-without-source" depends="clean" description="generate the distribution without the source file" >
86
    <!-- Create the distribution directory -->
87
    <mkdir dir="${without_src}"/>
88

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

    
103
</project>
104