Statistics
| Revision:

svn-gvsig-desktop / trunk / extensions / extGeoProcessing / build.xml @ 2678

History | View | Annotate | Download (3.45 KB)

1 2370 jmorell
<project name="Generar extension en Andami" default="generate-without-source" basedir=".">
2
    <description>
3
        Instala el plugin de GeoProcessing 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.geoprocessing"/>
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="compile"
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/geoprocessing"/>
38
    <mkdir dir="${dist}/bin/com/iver/gvsig/geoprocessing/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 todir="${dist}">
53
            <fileset dir="." includes="text*.properties"/>
54
    </copy>
55
    <jar jarfile="${dist}/bin/com/iver/gvsig/geoprocessing/${plugin}.jar" basedir="${bin}"/>
56
    <copy file="config/config.xml" todir="${dist}/bin/com/iver/gvsig/geoprocessing"/>
57
    <copy todir="${dist}/bin/com/iver/gvsig/geoprocessing/images">
58
      <fileset dir="images"/>
59
    </copy>
60
    <!-- Zip distribution -->
61
    <zip destfile="${dist}/gvSIGGeoProcessingPlugin.zip"
62
         basedir="${dist}"
63
         update="true"
64
    />
65
  </target>
66
67
  <target name="clean" depends="dist"
68
                description="clean dist directory" >
69
    <!-- Clean the distribution directory -->
70
    <delete dir="${dist}/src"/>
71
    <delete dir="${dist}/doc"/>
72
    <delete dir="${dist}/bin"/>
73
    <delete dir="${dist}/images"/>
74
    <delete dir="${dist}/config"/>
75 2670 jmorell
          <delete>
76
        <fileset dir="${dist}" includes="**/*.properties"/>
77
    </delete>
78 2370 jmorell
  </target>
79
80
  <target name="generate-without-source" depends="clean" description="generate the distribution without the source file" >
81
    <!-- Create the distribution directory -->
82
    <mkdir dir="${without_src}"/>
83
84
    <!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file -->
85
    <jar jarfile="${without_src}/${plugin}.jar" basedir="${bin}"/>
86
    <copy file="config/config.xml" todir="${without_src}"/>
87
    <copy todir="${without_src}">
88
            <fileset dir="." includes="text*.properties"/>
89
    </copy>
90
    <copy todir="${without_src}/images">
91
            <fileset dir="images/" includes="*"/>
92
    </copy>
93
    <move todir="${extensions-dir}/${plugin}/">
94
            <fileset dir="${without_src}" includes="**/**"/>
95
    </move>
96
  </target>
97
98
</project>