Statistics
| Revision:

svn-gvsig-desktop / tags / v10_RC2c / extensions / extCAD / build.xml @ 8745

History | View | Annotate | Download (3.46 KB)

1 7814 cesar
<project name="extCAD" default="dist" basedir=".">
2 3698 caballero
    <description>
3
        Instala el plugin de CAD
4
    </description>
5
  <!-- set global properties for this build -->
6
  <property name="src" location="src"/>
7
  <property name="build" location="bin"/>
8
  <property name="dist"  location="dist"/>
9
  <property name="plugin" value="com.iver.cit.gvsig.cad"/>
10 5607 cesar
  <property name="mainplugin" value="com.iver.cit.gvsig"/>
11
12
        <property name="lib" value="lib"/>
13
        <property name="andami" value="../_fwAndami"/>
14
        <property name="jarName" value="${plugin}.jar"/>
15
        <property name="extensionsDir" location="${andami}/gvSIG/extensiones"/>
16
        <property name="andamiJar" location="${andami}/andami.jar"/>
17
        <property name="gvsigJar" location="${extensionsDir}/com.iver.cit.gvsig/lib/com.iver.cit.gvsig.jar"/>
18
        <property name="andamiLibs" location="${andami}/lib"/>
19
        <property name="fmapLibs" location="../libFMap/lib" />
20 7773 cesar
        <import file="compile-classpath.xml"/>
21
        <import file="../libFMap/compile-classpath.xml"/>
22
        <import file="../_fwAndami/compile-classpath.xml"/>
23 7814 cesar
        <property name="compile-sourcepath" value="../appgvSIG/src"/>
24 5607 cesar
25 3698 caballero
  <target name="init">
26
    <!-- Create the time stamp -->
27
    <tstamp/>
28 7814 cesar
        <echo>
29
                Compiling ${ant.project.name}...</echo>
30 3698 caballero
31
  </target>
32
33
34 5607 cesar
  <target name="dist"
35 3698 caballero
        description="generate the distribution" >
36
    <!-- Create the distribution directory -->
37
    <mkdir dir="${dist}"/>
38 5607 cesar
    <copy todir="${extensionsDir}/${mainplugin}/lib">
39 3698 caballero
            <fileset dir="./lib" includes="*.jar,*.zip"/>
40
    </copy>
41 5607 cesar
          <jar jarfile="${dist}/${jarName}" basedir="${build}"/>
42 3698 caballero
    <copy file="config/config.xml" todir="${dist}"/>
43
    <copy todir="${dist}">
44 5612 cesar
            <fileset dir="config" includes="text*.properties"/>
45 3698 caballero
    </copy>
46
    <copy todir="${dist}/images">
47
            <fileset dir="images/" includes="*"/>
48
    </copy>
49
50 5607 cesar
    <move todir="${extensionsDir}/${plugin}/">
51 3698 caballero
            <fileset dir="${dist}" includes="**/**"/>
52
    </move>
53
  </target>
54 5607 cesar
55
                <target name="batch-build"
56
                                description="compile the sources, create the jar file"
57 7814 cesar
                                depends="init,compile,create-jar,copy-data-files,move-to-andami">
58 5607 cesar
                </target>
59 3698 caballero
60 5607 cesar
                <target name="compile" description="compile the source" >
61
                        <!-- Compile the Java code from ${src} to ${build} -->
62
                        <mkdir dir="${build}" />
63
                        <javac  srcdir="${src}"
64
                                destdir="${build}"
65
                                source="1.4"
66
                                target="1.4"
67 6296 cesar
                                debug="${debug}"
68
                                debuglevel="${debuglevel}"
69 7773 cesar
                                sourcepath="${compile-sourcepath}">
70
                            <classpath refid="extCAD.compile-classpath"/>
71
                            <classpath refid="libFMap.compile-classpath"/>
72
                            <classpath refid="_fwAndami.compile-classpath"/>
73
                        </javac>
74 5607 cesar
                </target>
75
76
                <target name="create-jar"
77
                                description="Creates the plugin jar">
78
                        <mkdir dir="${dist}"/>
79 5707 cesar
                    <jar jarfile="${dist}/${jarName}" basedir="${build}"/>
80 5607 cesar
                </target>
81
82
                <target name="copy-data-files">
83 5717 cesar
                    <copy file="config/config.xml" todir="${dist}"/>
84 5607 cesar
                        <copy todir="${dist}">
85 5612 cesar
                                <fileset dir="config" includes="text*.properties"/>
86 5607 cesar
                        </copy>
87
                        <copy todir="${dist}/images">
88
                                <fileset dir="images/" includes="*"/>
89
                        </copy>
90
                </target>
91
92
                <target name="move-to-andami">
93
                    <move todir="${extensionsDir}/${plugin}/">
94
                            <fileset dir="${dist}" includes="**/**"/>
95
                    </move>
96
                    <copy todir="${extensionsDir}/${mainplugin}/lib">
97
                            <fileset dir="./lib" includes="*.jar,*.zip"/>
98
                    </copy>
99
                </target>
100 3698 caballero
101
  <target name="clean"
102
        description="clean up" >
103
    <!-- Delete the ${build} and ${dist} directory trees -->
104
    <delete dir="${build}"/>
105
    <delete dir="${dist}"/>
106
  </target>
107
</project>