Statistics
| Revision:

root / trunk / extensions / extJDBC / build.xml @ 38571

History | View | Annotate | Download (3.9 KB)

1 7218 cesar
<project name="extJDBC" default="generate-without-source" basedir=".">
2 2269 fjp
    <description>
3
        Instala el plugin en Andami
4
    </description>
5
  <!-- set global properties for this build -->
6
  <property name="src" location="src"/>
7
  <property name="build" location="bin"/>
8 13469 cesar
  <property name="src-test" location="src-test"/>
9
  <property name="build-test" location="bin-test"/>
10 2269 fjp
  <property name="dist"  location="dist"/>
11 7813 cesar
  <property name="lib"  location="lib"/>
12 2269 fjp
  <property name="mainplugin" value="com.iver.cit.gvsig"/>
13
  <property name="plugin" value="com.iver.cit.gvsig.jdbc_spatial"/>
14 2279 fjp
  <property name="driverjar" value="jdbc_spatial"/>
15 5647 cesar
        <property name="andami" location="../_fwAndami"/>
16
        <property name="extensionsDir" location="${andami}/gvSIG/extensiones"/>
17 10684 cesar
          <property name="drivers-dir" location="${extensionsDir}/${mainplugin}/drivers/jdbc_spatial" />
18 5647 cesar
        <property name="lib-dir" location="${extensionsDir}/${mainplugin}/lib"/>
19 13236 jmvivo
        <import file="../binaries/ant/utilities.xml"/>
20 5648 cesar
21 2269 fjp
  <target name="init">
22
    <!-- Create the time stamp -->
23
    <tstamp/>
24 7218 cesar
        <echo>
25
                Compiling ${ant.project.name}...</echo>
26 2269 fjp
    <!-- Create the build directory structure used by compile -->
27
    <mkdir dir="${build}"/>
28
    <mkdir dir="${dist}"/>
29 8796 jmvivo
        <mkdir dir="${drivers-dir}" />
30 8662 caballero
31 2269 fjp
  </target>
32
33
  <target name="generate-without-source"
34 8796 jmvivo
                  description="generate the distribution without the source file"
35 9140 cesar
          depends="init,create-jar,copy-data-files,copy-to-andami,clean-dist">
36 8796 jmvivo
37 2269 fjp
  </target>
38
39 5647 cesar
        <target name="batch-build"
40
                        description="compile the sources, create the jar file"
41 7813 cesar
                        depends="init,compile,create-jar,copy-data-files,copy-to-andami">
42 5647 cesar
        </target>
43
44
        <target name="compile" description="compile the source" >
45 13296 jmvivo
                <antcall target="gvSIG-import-build-number"/>
46 5647 cesar
                <!-- Compile the Java code from ${src} to ${build} -->
47
                <mkdir dir="${build}" />
48 13126 jmvivo
                <loadEclipseClasspath project="${basedir}"/>
49 13296 jmvivo
                <gvSIG-javac
50 13204 jmvivo
                        classpath="${eclipseClasspath}"
51
                />
52 5647 cesar
        </target>
53 8662 caballero
54 5647 cesar
        <target name="create-jar"
55
                        description="Creates the plugin jar">
56 13126 jmvivo
57
58 9140 cesar
                  <jar jarfile="${dist}/${driverjar}.jar" basedir="${build}"
59 8796 jmvivo
                          includes="com/iver/cit/gvsig/fmap/drivers/jdbc/*.class com/iver/cit/gvsig/fmap/drivers/jdbc/postgis/** com/iver/cit/gvsig/fmap/drivers/jdbc/mysql/**"
60
                  />
61 9162 cesar
                  <jar jarfile="${dist}/${driverjar}-driver.jar" basedir="${build}"
62
                          includes="com/iver/cit/gvsig/fmap/drivers/jdbc/*.class com/iver/cit/gvsig/fmap/drivers/jdbc/postgis/** com/iver/cit/gvsig/fmap/drivers/jdbc/mysql/**"
63
                  />
64 13126 jmvivo
65 8796 jmvivo
            <jar jarfile="${dist}/${plugin}.jar" basedir="${build}"
66
                    includes="com/iver/cit/gvsig/** "
67
                    excludes="com/iver/cit/gvsig/fmap/drivers/**" />
68
69 5647 cesar
        </target>
70
71 37335 fpenarrubia
        <target name="copy-data-files">
72 13126 jmvivo
73 5647 cesar
            <copy file="config/config.xml" todir="${dist}"/>
74 10187 jmvivo
75
                <copy file="build.number" todir="${dist}"/>
76 34510 fdiaz
                <copy file="package.info" todir="${dist}"/>
77 5647 cesar
                <copy todir="${dist}">
78
                        <fileset dir="config" includes="text*.properties"/>
79
                </copy>
80
                <copy todir="${dist}/images">
81
                        <fileset dir="images/" includes="*"/>
82
                </copy>
83
        </target>
84 8662 caballero
85 7813 cesar
        <target name="copy-to-andami">
86 10555 cesar
                <copy file="build.number" todir="${extensionsDir}/${plugin}"/>
87 13126 jmvivo
88 9140 cesar
                  <copy todir="${drivers-dir}">
89
                          <fileset dir="${dist}" includes="${driverjar}.jar"/>
90 8908 jmvivo
                 </copy>
91
            <copy todir="${extensionsDir}/${plugin}/">
92 9162 cesar
                    <fileset dir="${dist}" excludes="${driverjar}.jar,${driverjar}-driver.jar"/>
93 8908 jmvivo
            </copy>
94 9162 cesar
            <copy todir="${lib-dir}">
95
                    <fileset dir="${dist}" includes="${driverjar}-driver.jar"/>
96
            </copy>
97 37335 fpenarrubia
                <copy file="lib/joda-time-2.0.jar" todir="${lib-dir}"/>
98 13126 jmvivo
99 5647 cesar
        </target>
100 13126 jmvivo
101 9140 cesar
        <target name="clean-dist">
102
            <delete dir="${dist}"/>
103
        </target>
104 8662 caballero
105 2269 fjp
  <target name="clean"
106
        description="clean up" >
107
    <!-- Delete the ${build} and ${dist} directory trees -->
108
    <delete dir="${dist}"/>
109 5647 cesar
    <delete dir="${build}"/>
110 2269 fjp
  </target>
111 13469 cesar
112
        <target name="run-tests" depends="batch-build,compile-tests">
113
                <antcall target="generic-run-tests">
114
                        <param name="TestSuite.Name" value="org.gvsig.remoteClient.AllTests"/>
115
                </antcall>
116
        </target>
117 2269 fjp
</project>