Statistics
| Revision:

root / trunk / extensions / extRasterTools / build.xml @ 9210

History | View | Annotate | Download (3.92 KB)

1 8088 cesar
<project name="extRasterTools" default="generate-without-source" basedir=".">
2 3890 nacho
    <description>
3
        Instala el plugin en Andami
4
    </description>
5
  <!-- set global properties for this build -->
6
  <property name="src" location="src"/>
7
  <property name="build" location="bin"/>
8
  <property name="dist"  location="dist"/>
9 5622 cesar
  <property name="andami" location="../_fwAndami"/>
10
  <property name="extensionsDir" location="${andami}/gvSIG/extensiones"/>
11
        <property name="andamiJar" location="${andami}/andami.jar"/>
12
        <property name="gvsigJar" location="${extensionsDir}/com.iver.cit.gvsig/lib/com.iver.cit.gvsig.jar"/>
13
        <property name="cmsLibs" location="../libCq CMS for java/lib" />
14
        <property name="fmapLibs" location="../libFMap/lib" />
15
        <property name="andamiLibs" location="${andami}/lib" />
16 8088 cesar
        <property name="compile-classpath" value="${andamiJar}:${gvsigJar}:${fmapLibs}/cms.jar:${fmapLibs}/fmap.jar:${andamiLibs}/iver-utiles.jar:${cmsLibs}/jecw-0.0.1.jar:${cmsLibs}/jecwcompress-0.1.0.jar:${cmsLibs}/jgdal-0.6.0.jar:${cmsLibs}/jmrsid-0.0.2.jar" />
17 4548 nacho
18 3890 nacho
  <!--Plugins-->
19 5622 cesar
  <property name="plugin" value="org.gvsig.rasterTools"/>
20
  <property name="jarName" value="${plugin}.jar"/>
21 3890 nacho
22
  <target name="init">
23
    <!-- Create the time stamp -->
24
    <tstamp/>
25 8088 cesar
26
        <echo>
27
                Compiling ${ant.project.name}...</echo>
28 3890 nacho
    <!-- Create the build directory structure used by compile -->
29
    <mkdir dir="${dist}"/>
30
          <!-- Creamos un fichero con el timeStamp para que lo lea el FPanelAbout -->
31 8088 cesar
          <!-- <buildnumber/> -->
32 3890 nacho
  </target>
33
34
  <target name="generate-without-source"
35
                  description="generate the distribution without the source file">
36
37
    <!-- Create the distribution directory -->
38
    <mkdir dir="${dist}"/>
39
40
    <!-- Jars de las extensiones -->
41 5622 cesar
    <jar jarfile="${dist}/${jarName}" basedir="${build}"
42
            includes="org/gvsig/rasterTools/**"
43 5534 nacho
            excludes="org/gvsig/rasterTools/brightnessContrast/**,org/gvsig/rasterTools/histogram/**"/>
44 4582 nacho
45 3890 nacho
          <!-- Instala extensión salvar a raster -->
46 5622 cesar
    <move todir="${extensionsDir}/${plugin}/">
47
            <fileset dir="${dist}" includes="${jarName}"/>
48 3890 nacho
    </move>
49 5622 cesar
          <copy file="config/config.xml" todir="${extensionsDir}/${plugin}"/>
50
          <copy file="config/plugin.dtd" todir="${extensionsDir}/${plugin}"/>
51
          <copy todir="${extensionsDir}/${plugin}">
52 5623 cesar
                      <fileset dir="config" includes="text*.properties"/>
53 3890 nacho
          </copy>
54 5622 cesar
          <mkdir dir="${extensionsDir}/${plugin}/images"/>
55
          <copy todir="${extensionsDir}/${plugin}/images">
56
                      <fileset dir="./images/" includes="*"/>
57 3890 nacho
          </copy>
58
59
  </target>
60
61 5622 cesar
        <target name="batch-build"
62
                        description="compile the sources, create the jar file"
63 8088 cesar
                        depends="init,compile,create-jar,copy-data-files,move-to-andami">
64 5622 cesar
        </target>
65
66
        <target name="compile" description="compile the source" >
67
                <!-- Compile the Java code from ${src} to ${build} -->
68
                <mkdir dir="${build}" />
69
                <javac  srcdir="${src}"
70
                        destdir="${build}"
71 7786 cesar
                        source="1.4"
72
                        target="1.4"
73 6296 cesar
                        debug="${debug}"
74
                        debuglevel="${debuglevel}"
75 5622 cesar
                        classpath="${compile-classpath}"/>
76
        </target>
77
78
        <target name="create-jar"
79
                        description="Creates the plugin jar">
80
                <mkdir dir="${dist}"/>
81
            <jar jarfile="${dist}/${jarName}" basedir="${build}"
82
                    includes="org/gvsig/rasterTools/**"
83
                    excludes="org/gvsig/rasterTools/brightnessContrast/**,org/gvsig/rasterTools/histogram/**"/>
84
        </target>
85
86
        <target name="copy-data-files">
87
            <copy file="config/config.xml" todir="${dist}"/>
88
                  <copy file="config/plugin.dtd" todir="${dist}"/>
89
                <copy todir="${dist}">
90 5623 cesar
                        <fileset dir="config" includes="text*.properties"/>
91 5622 cesar
                </copy>
92
                <copy todir="${dist}/images">
93
                        <fileset dir="images/" includes="*"/>
94
                </copy>
95
        </target>
96
97
        <target name="move-to-andami">
98
            <move todir="${extensionsDir}/${plugin}/">
99
                    <fileset dir="${dist}" includes="**/**"/>
100
            </move>
101
        </target>
102
103 3890 nacho
  <target name="clean"
104
        description="clean up" >
105
    <!-- Delete the ${build} and ${dist} directory trees -->
106
    <delete dir="${dist}"/>
107 5622 cesar
    <delete dir="${build}"/>
108 3890 nacho
  </target>
109
</project>