Statistics
| Revision:

svn-gvsig-desktop / tags / v1_0_2_RELEASE / extensions / extGeoProcessing / build.xml @ 11432

History | View | Annotate | Download (6.25 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 5726 azabala
  <property name="plugin" value="com.iver.cit.gvsig.geoprocess"/>
14 2370 jmorell
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 6280 cesar
        <property name="compile-classpath" value="${andamiJar}:${gvsigJar}:${andamiLibs}/beans.jar:${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 10565 jmvivo
        <property name="JavaSourceVersion" value="1.4"/>
26
        <property name="JavaTargetVersion" value="1.4"/>
27 5608 cesar
28
29 2370 jmorell
  <target name="init">
30
    <!-- Create the time stamp -->
31
    <tstamp/>
32 7217 cesar
        <echo>
33
                Compiling ${ant.project.name}...</echo>
34 2370 jmorell
  </target>
35 4152 azabala
36 10185 jmvivo
          <target name="import-build-number">
37
                  <copy todir=".">
38
                          <fileset file="${buildNumberFile}"/>
39
                  </copy>
40
          </target>
41 2370 jmorell
42 2679 jmorell
  <target name="dist" depends="init"
43 2370 jmorell
        description="generate the distribution" >
44
    <!-- Remove previous distribution directory -->
45
    <delete dir="${dist}"/>
46
    <!-- Create the distribution directory structure -->
47
    <mkdir dir="${dist}"/>
48 6889 fjp
<!--    <mkdir dir="${dist}/src"/> -->
49
<!--    <mkdir dir="${dist}/doc"/> -->
50 2370 jmorell
    <mkdir dir="${dist}/bin"/>
51
    <mkdir dir="${dist}/bin/com"/>
52
    <mkdir dir="${dist}/bin/com/iver"/>
53
    <mkdir dir="${dist}/bin/com/iver/gvsig"/>
54
    <mkdir dir="${dist}/bin/com/iver/gvsig/geoprocessing"/>
55
    <mkdir dir="${dist}/bin/com/iver/gvsig/geoprocessing/images"/>
56
    <mkdir dir="${dist}/images"/>
57
    <mkdir dir="${dist}/config"/>
58 4152 azabala
    <mkdir dir="${dist}/lib"/>
59 2370 jmorell
    <!-- Copy necessary distribution files to dist dir -->
60 6889 fjp
    <!-- <copy todir="${dist}/src">
61 2370 jmorell
      <fileset dir="${src}"/>
62 6889 fjp
    </copy>
63 2370 jmorell
    <copy todir="${dist}/doc">
64
      <fileset dir="${doc}"/>
65 6889 fjp
    </copy> -->
66 2370 jmorell
    <copy todir="${dist}/images">
67
      <fileset dir="images"/>
68
    </copy>
69 4152 azabala
     <copy todir="${dist}/lib">
70
            <fileset dir="lib" includes="*.*"/>
71
    </copy>
72 2370 jmorell
    <copy file="config/config.xml" todir="${dist}/config"/>
73 10185 jmvivo
          <copy file="build.number" todir="${dist}"/>
74 2679 jmorell
    <copy file="build.xml" todir="${dist}"/>
75 2370 jmorell
    <copy todir="${dist}">
76 5618 cesar
            <fileset dir="config" includes="text*.properties"/>
77 2370 jmorell
    </copy>
78 5608 cesar
    <jar jarfile="${dist}/bin/com/iver/gvsig/geoprocessing/${plugin}.jar" basedir="${build}"/>
79 2370 jmorell
    <copy file="config/config.xml" todir="${dist}/bin/com/iver/gvsig/geoprocessing"/>
80 10185 jmvivo
          <copy file="build.number" todir="${dist}/bin/com/iver/gvsig/geoprocessing"/>
81 2370 jmorell
    <copy todir="${dist}/bin/com/iver/gvsig/geoprocessing/images">
82
      <fileset dir="images"/>
83
    </copy>
84
    <!-- Zip distribution -->
85 6889 fjp
    <!--<zip destfile="${dist}/gvSIGGeoProcessingPlugin.zip"
86 2370 jmorell
         basedir="${dist}"
87
         update="true"
88 6889 fjp
    /> -->
89 2370 jmorell
  </target>
90 4152 azabala
91 6889 fjp
  <target name="clean-orig"
92 2370 jmorell
                description="clean dist directory" >
93
    <!-- Clean the distribution directory -->
94 6889 fjp
    <delete dir="${dist}" />
95 2370 jmorell
  </target>
96
97 5608 cesar
  <target name="generate-without-source" depends="clean-orig" description="generate the distribution without the source file" >
98 2370 jmorell
    <!-- Create the distribution directory -->
99
    <mkdir dir="${without_src}"/>
100 6889 fjp
    <mkdir dir="${without_src}/lib"/>
101 2370 jmorell
102
    <!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file -->
103 6889 fjp
    <jar jarfile="${without_src}/lib/${plugin}.jar" basedir="${build}"/>
104 2370 jmorell
    <copy file="config/config.xml" todir="${without_src}"/>
105 10185 jmvivo
          <copy file="build.number" todir="${without_src}"/>
106 2370 jmorell
    <copy todir="${without_src}">
107 5618 cesar
            <fileset dir="config" includes="text*.properties"/>
108 2370 jmorell
    </copy>
109 6889 fjp
          <copy todir="${without_src}/lib">
110 4174 azabala
                      <fileset dir="lib" includes="*.*"/>
111
              </copy>
112 2370 jmorell
    <copy todir="${without_src}/images">
113
            <fileset dir="images/" includes="*"/>
114
    </copy>
115 5608 cesar
    <move todir="${extensionsDir}/${plugin}/">
116 2370 jmorell
            <fileset dir="${without_src}" includes="**/**"/>
117
    </move>
118
  </target>
119 5608 cesar
120
        <target name="batch-build"
121
                        description="compile the sources, create the jar file"
122 7217 cesar
                        depends="init,compile,create-jar,copy-data-files,copy-libs,move-to-andami">
123 5608 cesar
        </target>
124 2370 jmorell
125 5608 cesar
        <target name="compile" description="compile the source" >
126
                <!-- Compile the Java code from ${src} to ${build} -->
127
                <mkdir dir="${build}" />
128
                <javac  srcdir="${src}"
129
                        destdir="${build}"
130 10565 jmvivo
                    source="${JavaSourceVersion}"
131
                        target="${JavaTargetVersion}"
132 6296 cesar
                        debug="${debug}"
133
                        debuglevel="${debuglevel}"
134 5608 cesar
                        classpath="${compile-classpath}"/>
135 7722 cesar
                <copy todir="${build}">
136
                        <fileset dir="${src}" excludes="**/*.java" casesensitive="false"/>
137
                </copy>
138 5608 cesar
        </target>
139
140
        <target name="create-jar"
141
                        description="Creates the plugin jar">
142
                <mkdir dir="${dist}"/>
143
        <!--        <jar jarfile="${dist}/bin/com/iver/gvsig/geoprocessing/${plugin}.jar" basedir="${build}"/>-->
144
            <jar jarfile="${dist}/${jarName}" basedir="${build}"/>
145
        </target>
146
147
        <target name="copy-data-files">
148
            <copy file="config/config.xml" todir="${dist}"/>
149 10185 jmvivo
                <copy file="build.number" todir="${dist}"/>
150 5608 cesar
                <copy todir="${dist}">
151 5618 cesar
                        <fileset dir="config" includes="text*.properties"/>
152 5608 cesar
                </copy>
153
                <copy todir="${dist}/images">
154
                        <fileset dir="images/" includes="*"/>
155
                </copy>
156
        </target>
157
158
        <target name="copy-libs">
159 7217 cesar
                  <copy todir="${dist}/lib">
160 5608 cesar
                              <fileset dir="lib" includes="*.*"/>
161
                  </copy>
162 7217 cesar
                <copy todir="${dist}/lib">
163
                        <fileset file="${dist}/${jarName}" />
164
                </copy>
165 5608 cesar
        </target>
166
167
        <target name="move-to-andami">
168
            <move todir="${extensionsDir}/${plugin}/">
169
                    <fileset dir="${dist}" includes="**/**"/>
170
            </move>
171
        </target>
172 5798 azabala
173 5608 cesar
        <target name="clean"
174
                description="clean up" >
175
                <delete dir="${build}"/>
176
                <delete dir="${dist}"/>
177
        </target>
178 5798 azabala
179 2370 jmorell
</project>