Statistics
| Revision:

root / trunk / extensions / extGeoProcessing / build.xml @ 11445

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