Statistics
| Revision:

root / trunk / libraries / libCq_CMS_praster / build.xml @ 8026

History | View | Annotate | Download (2.88 KB)

1
<project name="CMS for Java" default="dist" basedir=".">
2
    <description>
3
        Genera el jar con CMS y sus dependencias
4
    </description>
5
  <!-- set global properties for this build -->
6
        <property name="src" location="src"/>
7
        <property name="lib" location="lib"/>
8
        <property name="build" location="bin"/>
9
        <property name="dist"  location="dist"/>
10
        <property name="jar" value="cms"/>
11
        <property name="targetDir" location="../libFMap/lib"/>
12
        <property name="compile-classpath" value="${lib}/geoapi-2.0.jar:${lib}/geojava.jar:${lib}/geotiff-jai.jar:${lib}/gt2-legacy.jar:${lib}/gt2-main.jar:${lib}/jecw-0.0.1.jar:${lib}/jecwcompress-0.1.0.jar:${lib}/jgdal-0.1.0.jar:${lib}/jmgeoraster.jar:${lib}/jmrsid-0.0.2.jar:${lib}/jogr.jar:${lib}/kxml2.jar:${lib}/tar.jar" />
13

    
14
  <target name="init">
15
    <!-- Create the time stamp -->
16
    <tstamp/>
17
    <!-- Create the build directory structure used by compile -->
18
    <mkdir dir="${build}"/>
19
  </target>
20

    
21
  <target name="dist" depends="init"
22
        description="generate the distribution" >
23
    <!-- Create the distribution directory -->
24
    <mkdir dir="${dist}"/>
25

    
26
    <!-- Put everything in ${build} into the cms-${DSTAMP}.jar file --> 
27
    <jar jarfile="${dist}/${jar}.jar" basedir="${build}"/>
28
    <jar jarfile="${dist}/${jar}.jar" basedir="." includes = "images/*.gif" update="true" />
29
    <copy todir="${dist}">
30
            <fileset dir="./lib" includes="*.jar"/>
31
    </copy>
32
    <!--<copy todir="${targetDir1}/">
33
            <fileset dir="${dist}" includes="**/**"/>
34
    </copy>
35
    <copy todir="${targetDir2}/">
36
            <fileset dir="${dist}" includes="${jar}.jar"/>
37
    </copy> -->
38
    <move todir="${targetDir}/">
39
            <fileset dir="${dist}" includes="**/**"/>
40
    </move>
41
  </target>
42

    
43
        <target name="batch-build"
44
                        description="compile the sources, create the jar file"
45
                        depends="compile,create-jar,move-to-fmap">
46
        </target>
47
        
48
        <target name="compile" description="compile the source" >
49
                <!-- Compile the Java code from ${src} to ${build} -->
50
                <mkdir dir="${build}" />
51
                <javac         srcdir="${src}"
52
                                destdir="${build}"
53
                                classpath="${compile-classpath}"/>
54
        </target>
55
        
56
        <target name="move-to-fmap" description="Move jars and required libraries to fmap">
57
            <copy todir="${dist}">
58
                    <fileset dir="./lib" includes="*.jar"/>
59
            </copy>
60
            <copy todir=".">
61
                    <fileset dir="${dist}" includes="${jar}.jar"/>
62
            </copy>
63
            <move todir="${targetDir}/">
64
                    <fileset dir="${dist}" includes="**/**"/>
65
            </move>
66
        </target>
67
        
68
        <target name="create-jar" description="Crea el jar de la aplicacion">
69
                <mkdir dir="${dist}"/>
70
            <jar jarfile="${dist}/${jar}.jar" basedir="${build}"/>
71
            <jar jarfile="${dist}/${jar}.jar" basedir="." includes = "images/*" update="true" />
72
        </target>
73

    
74
        <target name="clean"
75
                        description="clean up" >
76
                <!-- Delete the ${build} and ${dist} directory trees -->
77
                <delete dir="${build}"/>
78
                <delete dir="${dist}"/>
79
                <delete file="${jar}.jar"/>
80
        </target>
81
</project>
82