Statistics
| Revision:

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

History | View | Annotate | Download (3.78 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 13503 cesar
        <property name="src-test" location="src-test"/>
8 4852 cesar
        <property name="lib" location="../_fwAndami/lib"/>
9
        <property name="build" location="bin"/>
10 13352 cesar
        <property name="build-test" location="bin-test"/>
11 4852 cesar
        <property name="dist"  location="dist"/>
12 4904 cesar
        <property name="andamiJar" location="../_fwAndami/andami.jar"/>
13 4852 cesar
        <property name="plugin" value="com.iver.core"/>
14
        <property name="targetDir" location="../_fwAndami/gvSIG/extensiones"/>
15 13126 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" />-->
16 13236 jmvivo
        <import file="../binaries/ant/utilities.xml"/>
17 592 fernando
18
  <target name="init">
19
    <!-- Create the time stamp -->
20
    <tstamp/>
21 10192 cesar
        <echo>
22
                Compiling ${ant.project.name}...</echo>
23 592 fernando
    <!-- Create the build directory structure used by compile -->
24
    <mkdir dir="${build}"/>
25
  </target>
26
27 34510 fdiaz
  <target name="dist" description="generate the distribution" depends="make-package-info">
28 592 fernando
    <!-- 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 5712 cesar
    <copy file="config/config.xml" todir="${dist}"/>
37 10187 jmvivo
          <copy file="build.number" todir="${dist}"/>
38 34510 fdiaz
        <copy file="package.info" todir="${dist}"/>
39
        <copy todir="${dist}">
40 5712 cesar
            <fileset dir="config" includes="text*.properties"/>
41 592 fernando
    </copy>
42
    <copy todir="${dist}/images">
43
            <fileset dir="images/" includes="*"/>
44
    </copy>
45
    <copy todir="${dist}">
46
            <fileset dir="." includes="*.jar"/>
47
    </copy>
48
49
    <move todir="${targetDir}/${plugin}/">
50
            <fileset dir="${dist}" includes="**/**"/>
51
    </move>
52
  </target>
53
54 4852 cesar
    <target name="batch-build"
55
                description="compile the sources, create the jar file"
56
                depends="compile,create-jar,copy-data-files,move-to-andami">
57
    </target>
58 13126 jmvivo
59 4852 cesar
    <target name="compile" description="compile the source" >
60 13296 jmvivo
                <antcall target="gvSIG-import-build-number"/>
61 4852 cesar
        <!-- Compile the Java code from ${src} to ${build} -->
62
            <mkdir dir="${build}" />
63 13126 jmvivo
                <loadEclipseClasspath project="${basedir}"/>
64 13296 jmvivo
                <gvSIG-javac
65 13204 jmvivo
                        classpath="${eclipseClasspath}"
66
                />
67 13126 jmvivo
        <!--<javac        srcdir="${src}"
68 7786 cesar
                                destdir="${build}"
69
                                source="1.4"
70
                                target="1.4"
71
                                debug="${debug}"
72
                                debuglevel="${debuglevel}"
73 13126 jmvivo
                                classpath="${compile-classpath}"/>-->
74 4852 cesar
        </target>
75 13126 jmvivo
76 34510 fdiaz
        <target name="copy-data-files" depends="make-package-info">
77 5712 cesar
                <copy file="config/config.xml" todir="${dist}"/>
78 10187 jmvivo
                <copy file="build.number" todir="${dist}"/>
79 34510 fdiaz
                <copy file="package.info" todir="${dist}"/>
80 4852 cesar
                <copy todir="${dist}">
81 5712 cesar
                        <fileset dir="config" includes="text*.properties"/>
82 4852 cesar
                </copy>
83
                <copy todir="${dist}/images">
84
                        <fileset dir="images/" includes="*"/>
85
                </copy>
86
                <copy todir="${dist}">
87
                        <fileset dir="." includes="*.jar"/>
88
                </copy>
89
    </target>
90 13126 jmvivo
91 4852 cesar
        <target name="move-to-andami" description="Moves the build directory to andami">
92
            <move todir="${targetDir}/${plugin}/">
93
                    <fileset dir="${dist}" includes="**/**"/>
94
            </move>
95
        </target>
96 13126 jmvivo
97 4852 cesar
        <target name="create-jar" description="Crea el jar de la aplicacion">
98
                <mkdir dir="${dist}"/>
99
                <jar jarfile="${dist}/${plugin}.jar" basedir="${build}"/>
100
        </target>
101 13126 jmvivo
102 4852 cesar
        <target name="clean" description="clean up" >
103
                <!-- Delete the ${build} and ${dist} directory trees -->
104
                <delete dir="${build}"/>
105
                <delete dir="${dist}"/>
106
        </target>
107
108 13503 cesar
        <target name="run-tests" depends="batch-build,compile-tests">
109 13352 cesar
                <antcall target="generic-run-tests">
110
                        <param name="TestSuite.Name" value="com.iver.core.AllTests"/>
111
                </antcall>
112
        </target>
113 592 fernando
</project>