Statistics
| Revision:

svn-gvsig-desktop / tags / v1_9_Build_1252 / libraries / libCorePlugin / build.xml @ 47840

History | View | Annotate | Download (3.64 KB)

1
<project name="Core plugin" default="dist" basedir=".">
2
    <description>
3
        Instala el plugin
4
    </description>
5
  <!-- set global properties for this build -->
6
        <property name="src" location="src"/>
7
        <property name="src-test" location="src-test"/>
8
        <property name="lib" location="../_fwAndami/lib"/>
9
        <property name="build" location="bin"/>
10
        <property name="build-test" location="bin-test"/>
11
        <property name="dist"  location="dist"/>
12
        <property name="andamiJar" location="../_fwAndami/andami.jar"/>
13
        <property name="plugin" value="com.iver.core"/>
14
        <property name="targetDir" location="../_fwAndami/gvSIG/extensiones"/>
15
        <!--<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" />-->
16
        <import file="../binaries/ant/utilities.xml"/>
17

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

    
27
  <target name="dist" description="generate the distribution" >
28
    <!-- Create the distribution directory -->
29
    <mkdir dir="${dist}"/>
30

    
31
    <!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file -->
32
    <copy todir="${build}">
33
            <fileset dir="${src}" includes="**"/>
34
    </copy>
35
    <jar jarfile="${dist}/${plugin}.jar" basedir="${build}"/>
36
    <copy file="config/config.xml" todir="${dist}"/>
37
          <copy file="build.number" todir="${dist}"/>
38
    <copy todir="${dist}">
39
            <fileset dir="config" includes="text*.properties"/>
40
    </copy>
41
    <copy todir="${dist}/images">
42
            <fileset dir="images/" includes="*"/>
43
    </copy>
44
    <copy todir="${dist}">
45
            <fileset dir="." includes="*.jar"/>
46
    </copy>
47

    
48
    <move todir="${targetDir}/${plugin}/">
49
            <fileset dir="${dist}" includes="**/**"/>
50
    </move>
51
  </target>
52

    
53
    <target name="batch-build"
54
                description="compile the sources, create the jar file"
55
                depends="compile,create-jar,copy-data-files,move-to-andami">
56
    </target>
57

    
58
    <target name="compile" description="compile the source" >
59
                <antcall target="gvSIG-import-build-number"/>
60
        <!-- Compile the Java code from ${src} to ${build} -->
61
            <mkdir dir="${build}" />
62
                <loadEclipseClasspath project="${basedir}"/>
63
                <gvSIG-javac
64
                        classpath="${eclipseClasspath}"
65
                />
66
        <!--<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
        </target>
74

    
75
        <target name="copy-data-files">
76
                <copy file="config/config.xml" todir="${dist}"/>
77
                <copy file="build.number" todir="${dist}"/>
78
                <copy todir="${dist}">
79
                        <fileset dir="config" includes="text*.properties"/>
80
                </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
        <target name="run-tests" depends="batch-build,compile-tests">
107
                <antcall target="generic-run-tests">
108
                        <param name="TestSuite.Name" value="com.iver.core.AllTests"/>
109
                </antcall>
110
        </target>
111
</project>
112