Statistics
| Revision:

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

History | View | Annotate | Download (3.46 KB)

1
<project name="extCAD" default="dist" basedir=".">
2
    <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
  <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
        <import file="compile-classpath.xml"/>
21
        <import file="../libFMap/compile-classpath.xml"/>
22
        <import file="../_fwAndami/compile-classpath.xml"/>
23
        <property name="compile-sourcepath" value="../appgvSIG/src"/>
24
        
25
  <target name="init">
26
    <!-- Create the time stamp -->
27
    <tstamp/>
28
        <echo>
29
                Compiling ${ant.project.name}...</echo>
30

    
31
  </target>
32

    
33

    
34
  <target name="dist"
35
        description="generate the distribution" >
36
    <!-- Create the distribution directory -->
37
    <mkdir dir="${dist}"/>
38
    <copy todir="${extensionsDir}/${mainplugin}/lib">
39
            <fileset dir="./lib" includes="*.jar,*.zip"/>
40
    </copy>
41
          <jar jarfile="${dist}/${jarName}" basedir="${build}"/>
42
    <copy file="config/config.xml" todir="${dist}"/>
43
    <copy todir="${dist}">
44
            <fileset dir="config" includes="text*.properties"/>
45
    </copy>
46
    <copy todir="${dist}/images">
47
            <fileset dir="images/" includes="*"/>
48
    </copy>
49

    
50
    <move todir="${extensionsDir}/${plugin}/">
51
            <fileset dir="${dist}" includes="**/**"/>
52
    </move>
53
  </target>
54
        
55
                <target name="batch-build"
56
                                description="compile the sources, create the jar file"
57
                                depends="init,compile,create-jar,copy-data-files,move-to-andami">
58
                </target>
59

    
60
                <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
                                debug="${debug}"
68
                                debuglevel="${debuglevel}"
69
                                sourcepath="${compile-sourcepath}">
70
                            <classpath refid="extCAD.compile-classpath"/>
71
                            <classpath refid="libFMap.compile-classpath"/>
72
                            <classpath refid="_fwAndami.compile-classpath"/>
73
                        </javac>
74
                </target>
75
                
76
                <target name="create-jar"
77
                                description="Creates the plugin jar">
78
                        <mkdir dir="${dist}"/>
79
                    <jar jarfile="${dist}/${jarName}" basedir="${build}"/>
80
                </target>
81
        
82
                <target name="copy-data-files">
83
                    <copy file="config/config.xml" todir="${dist}"/>
84
                        <copy todir="${dist}">
85
                                <fileset dir="config" includes="text*.properties"/>
86
                        </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

    
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>
108