Statistics
| Revision:

root / trunk / libraries / libGPE-KML / build.xml @ 10637

History | View | Annotate | Download (2.65 KB)

1
<project name="libGPE-KML" default="dist" basedir=".">
2
        <description>
3
        Genera el jar con libGPE-KML y sus dependencias
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
        <property name="lib" location="lib" />
10
        <property name="remoteServicesLibs" location="../remoteServices/lib" />
11
        <property name="fmapLibs" location="../libFMap" />
12
        <property name="jarName" value="libGPE-KML" />
13
        <property name="targetDir" location="../libFMap/lib" />
14
        <property name="compile-classpath" value="${remoteServicesLibs}/kxml2.jar:${remoteServicesLibs}/gvsig-exceptions.jar" />
15

    
16
        <target name="init">
17
                <!-- Create the time stamp -->
18
                <tstamp />
19
                <echo>
20
                        Compiling ${ant.project.name}...</echo>
21
                <!-- Create the build directory structure used by compile -->
22
                <mkdir dir="${build}" />
23
        </target>
24

    
25
        <target name="dist" depends="init" description="generate the distribution">
26
                <!-- Create the distribution directory -->
27
                <mkdir dir="${dist}" />
28

    
29
                <!-- Put everything in ${build} into the cms-${DSTAMP}.jar file -->
30
                <jar jarfile="${dist}/${jarName}.jar" basedir="${build}"  />
31
                
32
                <move todir="${targetDir}/">
33
                        <fileset dir="${dist}" includes="**/**" />
34
                </move>
35
                <!--<copy todir="${targetDir}/">
36
                        <fileset dir="${lib}" includes="*.jar" />
37
                </copy>-->
38
        </target>
39

    
40
        <target                name="batch-build"
41
                                description="compile the sources, create the jar file"
42
                                depends="init,compile,create-jar,move-to-fmap">
43
        </target>
44

    
45
        <target name="compile" description="compile the source">
46
                <!-- Compile the Java code from ${src} to ${build} -->
47
                <mkdir dir="${build}" />
48
                <javac        srcdir="${src}"
49
                                destdir="${build}"
50
                                source="1.4"
51
                                target="1.4"
52
                                classpath="${compile-classpath}"
53
                                debug="${debug}"
54
                                debuglevel="${debuglevel}"
55
                                excludes="**/Tests/*.java" />
56
        </target>
57

    
58
        <target name="move-to-fmap" description="Move jars and required libraries to fmap">
59
                <copy todir="${targetDir}">
60
                        <fileset dir="./lib" includes="*.jar" />
61
                </copy>
62
                <copy todir=".">
63
                        <fileset dir="${dist}" includes="${jarName}.jar" />
64
                </copy>
65
                <move todir="${targetDir}/">
66
                        <fileset dir="${dist}" includes="**/**" />
67
                </move>
68
        </target>
69

    
70
        <target name="create-jar" description="Crea el jar de la aplicacion">
71
                <mkdir dir="${dist}" />
72
                <jar jarfile="${dist}/${jarName}.jar" basedir="${build}" />
73
                <jar jarfile="${dist}/${jarName}.jar" basedir="." includes="images/*" update="true" />
74
        </target>
75

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