Statistics
| Revision:

svn-gvsig-desktop / tags / v10_RC2c / extensions / extGeoProcessing / build.xml @ 8745

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