Statistics
| Revision:

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

History | View | Annotate | Download (5.71 KB)

1 4152 azabala
<!--REHACERLO PARA QUE SE COPIEN BIEN LAS LIBRERIAS-->
2
3 5608 cesar
<project name="Geoprocessing" default="generate-without-source" basedir=".">
4 2370 jmorell
    <description>
5
        Instala el plugin de GeoProcessing en Andami.
6
    </description>
7
  <!-- set global properties for this build -->
8
  <property name="src" location="src"/>
9 5608 cesar
  <property name="build" location="bin"/>
10 2370 jmorell
  <property name="doc"  location="doc"/>
11
  <property name="dist"  location="dist"/>
12
  <property name="without_src"  location="without_src"/>
13
  <property name="plugin" value="com.iver.gvsig.geoprocessing"/>
14
15 5608 cesar
16
        <property name="lib" value="lib"/>
17
        <property name="andami" value="../_fwAndami"/>
18
        <property name="jarName" value="${plugin}.jar"/>
19
        <property name="extensionsDir" location="${andami}/gvSIG/extensiones"/>
20
        <property name="andamiJar" location="${andami}/andami.jar"/>
21
        <property name="gvsigJar" location="${extensionsDir}/com.iver.cit.gvsig/lib/com.iver.cit.gvsig.jar"/>
22
        <property name="andamiLibs" location="${andami}/lib"/>
23
        <property name="fmapLibs" location="../libFMap/lib" />
24
        <property name="compile-classpath" value="${andamiJar}:${gvsigJar}:${fmapLibs}/cms.jar:${fmapLibs}/driver-manager-1.1.jar:${lib}/ehcache-1.2beta4.jar:${fmapLibs}/fmap.jar:${fmapLibs}/gdbms-0.8-SNAPSHOT.jar:${andamiLibs}/iver-utiles.jar:${fmapLibs}/jts-1.7.jar:${lib}/spatialindex.jar"/>
25
26
27 2370 jmorell
  <target name="init">
28
    <!-- Create the time stamp -->
29
    <tstamp/>
30
  </target>
31 4152 azabala
32 2370 jmorell
33 2679 jmorell
  <target name="dist" depends="init"
34 2370 jmorell
        description="generate the distribution" >
35
    <!-- Remove previous distribution directory -->
36
    <delete dir="${dist}"/>
37
    <!-- Create the distribution directory structure -->
38
    <mkdir dir="${dist}"/>
39
    <mkdir dir="${dist}/src"/>
40
    <mkdir dir="${dist}/doc"/>
41
    <mkdir dir="${dist}/bin"/>
42
    <mkdir dir="${dist}/bin/com"/>
43
    <mkdir dir="${dist}/bin/com/iver"/>
44
    <mkdir dir="${dist}/bin/com/iver/gvsig"/>
45
    <mkdir dir="${dist}/bin/com/iver/gvsig/geoprocessing"/>
46
    <mkdir dir="${dist}/bin/com/iver/gvsig/geoprocessing/images"/>
47
    <mkdir dir="${dist}/images"/>
48
    <mkdir dir="${dist}/config"/>
49 4152 azabala
    <mkdir dir="${dist}/lib"/>
50 5629 cesar
    <mkdir dir="${build}"/>
51 2370 jmorell
    <!-- Copy necessary distribution files to dist dir -->
52
    <copy todir="${dist}/src">
53
      <fileset dir="${src}"/>
54
    </copy>
55
    <copy todir="${dist}/doc">
56
      <fileset dir="${doc}"/>
57
    </copy>
58
    <copy todir="${dist}/images">
59
      <fileset dir="images"/>
60
    </copy>
61 4152 azabala
     <copy todir="${dist}/lib">
62
            <fileset dir="lib" includes="*.*"/>
63
    </copy>
64 2370 jmorell
    <copy file="config/config.xml" todir="${dist}/config"/>
65 2679 jmorell
    <copy file="build.xml" todir="${dist}"/>
66 2370 jmorell
    <copy todir="${dist}">
67 5618 cesar
            <fileset dir="config" includes="text*.properties"/>
68 2370 jmorell
    </copy>
69 5608 cesar
    <jar jarfile="${dist}/bin/com/iver/gvsig/geoprocessing/${plugin}.jar" basedir="${build}"/>
70 2370 jmorell
    <copy file="config/config.xml" todir="${dist}/bin/com/iver/gvsig/geoprocessing"/>
71
    <copy todir="${dist}/bin/com/iver/gvsig/geoprocessing/images">
72
      <fileset dir="images"/>
73
    </copy>
74
    <!-- Zip distribution -->
75
    <zip destfile="${dist}/gvSIGGeoProcessingPlugin.zip"
76
         basedir="${dist}"
77
         update="true"
78
    />
79
  </target>
80 4152 azabala
81 5608 cesar
  <target name="clean-orig" depends="dist"
82 2370 jmorell
                description="clean dist directory" >
83
    <!-- Clean the distribution directory -->
84
    <delete dir="${dist}/src"/>
85
    <delete dir="${dist}/doc"/>
86
    <delete dir="${dist}/bin"/>
87
    <delete dir="${dist}/images"/>
88
    <delete dir="${dist}/config"/>
89 2679 jmorell
          <delete file="${dist}/build.xml"/>
90 2670 jmorell
          <delete>
91
        <fileset dir="${dist}" includes="**/*.properties"/>
92
    </delete>
93 2370 jmorell
  </target>
94
95 5608 cesar
  <target name="generate-without-source" depends="clean-orig" description="generate the distribution without the source file" >
96 2370 jmorell
    <!-- Create the distribution directory -->
97
    <mkdir dir="${without_src}"/>
98
99
    <!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file -->
100 5608 cesar
    <jar jarfile="${without_src}/${plugin}.jar" basedir="${build}"/>
101 2370 jmorell
    <copy file="config/config.xml" todir="${without_src}"/>
102
    <copy todir="${without_src}">
103 5618 cesar
            <fileset dir="config" includes="text*.properties"/>
104 2370 jmorell
    </copy>
105 4174 azabala
          <copy todir="${without_src}">
106
                      <fileset dir="lib" includes="*.*"/>
107
              </copy>
108 2370 jmorell
    <copy todir="${without_src}/images">
109
            <fileset dir="images/" includes="*"/>
110
    </copy>
111 5608 cesar
    <move todir="${extensionsDir}/${plugin}/">
112 2370 jmorell
            <fileset dir="${without_src}" includes="**/**"/>
113
    </move>
114
  </target>
115 5608 cesar
116
        <target name="batch-build"
117
                        description="compile the sources, create the jar file"
118
                        depends="compile,create-jar,copy-data-files,copy-libs,move-to-andami">
119
        </target>
120 2370 jmorell
121 5608 cesar
        <target name="compile" description="compile the source" >
122
                <!-- Compile the Java code from ${src} to ${build} -->
123
                <mkdir dir="${build}" />
124
                <javac  srcdir="${src}"
125
                        destdir="${build}"
126
                        classpath="${compile-classpath}"/>
127
        </target>
128
129
        <target name="create-jar"
130
                        description="Creates the plugin jar">
131
                <mkdir dir="${dist}"/>
132
        <!--        <jar jarfile="${dist}/bin/com/iver/gvsig/geoprocessing/${plugin}.jar" basedir="${build}"/>-->
133
            <jar jarfile="${dist}/${jarName}" basedir="${build}"/>
134
        </target>
135
136
        <target name="copy-data-files">
137
            <copy file="config/config.xml" todir="${dist}"/>
138
                <copy todir="${dist}">
139 5618 cesar
                        <fileset dir="config" includes="text*.properties"/>
140 5608 cesar
                </copy>
141
                <copy todir="${dist}/images">
142
                        <fileset dir="images/" includes="*"/>
143
                </copy>
144
        </target>
145
146
        <target name="copy-libs">
147
                  <copy todir="${dist}">
148
                              <fileset dir="lib" includes="*.*"/>
149
                  </copy>
150
        </target>
151
152
        <target name="move-to-andami">
153
            <move todir="${extensionsDir}/${plugin}/">
154
                    <fileset dir="${dist}" includes="**/**"/>
155
            </move>
156
        </target>
157
158
        <target name="clean"
159
                description="clean up" >
160
                <!-- Delete the ${build} and ${dist} directory trees -->
161
                <delete dir="${build}"/>
162
                <delete dir="${dist}"/>
163
        </target>
164 2370 jmorell
</project>