Statistics
| Revision:

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

History | View | Annotate | Download (3.55 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="i18n" location="../libInternationalization"/>
14
        <property name="i18nLibs" location="${i18n}/lib"/>        
15
        <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:${i18nLibs}/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" />
16
        <property name="JavaSourceVersion" value="1.4"/>
17
        <property name="JavaTargetVersion" value="1.4"/>
18
        
19
  <target name="init">
20
    <!-- Create the time stamp -->
21
    <tstamp/>
22
    <!-- Create the build directory structure used by compile -->
23
    <mkdir dir="${build}"/>
24
  </target>
25

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

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

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