Statistics
| Revision:

root / trunk / libraries / libCorePlugin / build.xml @ 11159

History | View | Annotate | Download (3.28 KB)

1 592 fernando
<project name="Core plugin" default="dist" basedir=".">
2
    <description>
3
        Instala el plugin
4
    </description>
5
  <!-- set global properties for this build -->
6 4852 cesar
        <property name="src" location="src"/>
7
        <property name="lib" location="../_fwAndami/lib"/>
8
        <property name="build" location="bin"/>
9
        <property name="dist"  location="dist"/>
10 4904 cesar
        <property name="andamiJar" location="../_fwAndami/andami.jar"/>
11 4852 cesar
        <property name="plugin" value="com.iver.core"/>
12
        <property name="targetDir" location="../_fwAndami/gvSIG/extensiones"/>
13 8417 jmvivo
        <property name="compile-classpath" value="${lib}/castor-0.9.5.3-xml.jar:${lib}/iver-utiles.jar:${lib}/log4j-1.2.8.jar:${andamiJar}:${lib}/beans.jar" />
14 4852 cesar
15 592 fernando
16
  <target name="init">
17
    <!-- Create the time stamp -->
18
    <tstamp/>
19 10192 cesar
        <echo>
20
                Compiling ${ant.project.name}...</echo>
21 592 fernando
    <!-- Create the build directory structure used by compile -->
22
    <mkdir dir="${build}"/>
23
  </target>
24
25 10187 jmvivo
26
  <target name="import-build-number">
27
          <copy todir=".">
28
                  <fileset file="${buildNumberFile}"/>
29
          </copy>
30
  </target>
31
32 592 fernando
  <target name="dist" description="generate the distribution" >
33
    <!-- Create the distribution directory -->
34
    <mkdir dir="${dist}"/>
35
36
    <!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file -->
37
    <copy todir="${build}">
38
            <fileset dir="${src}" includes="**"/>
39
    </copy>
40
    <jar jarfile="${dist}/${plugin}.jar" basedir="${build}"/>
41 5712 cesar
    <copy file="config/config.xml" todir="${dist}"/>
42 10187 jmvivo
          <copy file="build.number" todir="${dist}"/>
43 592 fernando
    <copy todir="${dist}">
44 5712 cesar
            <fileset dir="config" includes="text*.properties"/>
45 592 fernando
    </copy>
46
    <copy todir="${dist}/images">
47
            <fileset dir="images/" includes="*"/>
48
    </copy>
49
    <copy todir="${dist}">
50
            <fileset dir="." includes="*.jar"/>
51
    </copy>
52
53
    <move todir="${targetDir}/${plugin}/">
54
            <fileset dir="${dist}" includes="**/**"/>
55
    </move>
56
  </target>
57
58 4852 cesar
    <target name="batch-build"
59
                description="compile the sources, create the jar file"
60
                depends="compile,create-jar,copy-data-files,move-to-andami">
61
    </target>
62
63
    <target name="compile" description="compile the source" >
64
        <!-- Compile the Java code from ${src} to ${build} -->
65
            <mkdir dir="${build}" />
66 7786 cesar
        <javac        srcdir="${src}"
67
                                destdir="${build}"
68
                                source="1.4"
69
                                target="1.4"
70
                                debug="${debug}"
71
                                debuglevel="${debuglevel}"
72
                                classpath="${compile-classpath}"/>
73 4852 cesar
        </target>
74
75
        <target name="copy-data-files">
76 5712 cesar
                <copy file="config/config.xml" todir="${dist}"/>
77 10187 jmvivo
                <copy file="build.number" todir="${dist}"/>
78 4852 cesar
                <copy todir="${dist}">
79 5712 cesar
                        <fileset dir="config" includes="text*.properties"/>
80 4852 cesar
                </copy>
81
                <copy todir="${dist}/images">
82
                        <fileset dir="images/" includes="*"/>
83
                </copy>
84
                <copy todir="${dist}">
85
                        <fileset dir="." includes="*.jar"/>
86
                </copy>
87
    </target>
88
89
        <target name="move-to-andami" description="Moves the build directory to andami">
90
            <move todir="${targetDir}/${plugin}/">
91
                    <fileset dir="${dist}" includes="**/**"/>
92
            </move>
93
        </target>
94
95
        <target name="create-jar" description="Crea el jar de la aplicacion">
96
                <mkdir dir="${dist}"/>
97
                <jar jarfile="${dist}/${plugin}.jar" basedir="${build}"/>
98
        </target>
99
100
        <target name="clean" description="clean up" >
101
                <!-- Delete the ${build} and ${dist} directory trees -->
102
                <delete dir="${build}"/>
103
                <delete dir="${dist}"/>
104
        </target>
105
106 592 fernando
</project>