Statistics
| Revision:

svn-gvsig-desktop / tags / v10_RC2c / libraries / libCq CMS for java.old / build.xml @ 8745

History | View | Annotate | Download (3.31 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="cresques.home" value="${build}/org/cresques" />
13
        <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:${andamiLibs}/gvsig-i18n.jar:${lib}/jecw-0.0.1.jar:${lib}/jecwcompress-0.1.0.jar:${lib}/jgdal-0.6.0.jar:${lib}/jmgeoraster.jar:${lib}/jmrsid-0.0.2.jar:${lib}/jogr.jar:${lib}/kxml2.jar:${lib}/tar.jar" />
14

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

    
22
  <target name="dist" depends="init"
23
        description="generate the distribution" >
24
    <!-- Create the distribution directory -->
25
    <mkdir dir="${dist}"/>
26
    <copy todir="${cresques.home}/i18n/resources/translations">
27
            <fileset dir="config" includes="*" />
28
    </copy>
29
    <!-- Put everything in ${build} into the cms-${DSTAMP}.jar file --> 
30
    <jar jarfile="${dist}/${jar}.jar" basedir="${build}"/>
31
    <jar jarfile="${dist}/${jar}.jar" basedir="." includes = "images/*.gif" update="true" />
32
    <copy todir="${dist}">
33
            <fileset dir="./lib" includes="*.jar"/>
34
    </copy>
35
    <!--<copy todir="${targetDir1}/">
36
            <fileset dir="${dist}" includes="**/**"/>
37
    </copy>
38
    <copy todir="${targetDir2}/">
39
            <fileset dir="${dist}" includes="${jar}.jar"/>
40
    </copy> -->
41
    <move todir="${targetDir}/">
42
            <fileset dir="${dist}" includes="**/**"/>
43
    </move>
44
  </target>
45

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

    
84
        <target name="clean"
85
                        description="clean up" >
86
                <!-- Delete the ${build} and ${dist} directory trees -->
87
                <delete dir="${build}"/>
88
                <delete dir="${dist}"/>
89
                <delete file="${jar}.jar"/>
90
        </target>
91
</project>
92