Statistics
| Revision:

svn-gvsig-desktop / trunk / extensions / extCAD / build.xml @ 13082

History | View | Annotate | Download (3.96 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
        <property name="JavaSourceVersion" value="1.4"/>
25
        <property name="JavaTargetVersion" value="1.4"/>
26
        <property name="encoding" value="ISO_8859_1"/>
27
        <property name="debug" value="on"/>
28
        <property name="debuglevel" value="lines, vars"/>
29

    
30
        
31
  <target name="init">
32
    <!-- Create the time stamp -->
33
    <tstamp/>
34
        <echo>
35
                Compiling ${ant.project.name}...</echo>
36

    
37
  </target>
38

    
39

    
40
  <target name="dist"
41
        description="generate the distribution" >
42
    <!-- Create the distribution directory -->
43
    <mkdir dir="${dist}"/>
44
    <copy todir="${extensionsDir}/${mainplugin}/lib">
45
            <fileset dir="./lib" includes="*.jar,*.zip"/>
46
    </copy>
47
          <jar jarfile="${dist}/${jarName}" basedir="${build}"/>
48
    <copy file="config/config.xml" todir="${dist}"/>
49
          <copy file="build.number" todir="${dist}"/>
50
    <copy todir="${dist}">
51
            <fileset dir="config" includes="text*.properties"/>
52
    </copy>
53
    <copy todir="${dist}/images">
54
            <fileset dir="images/" includes="*"/>
55
    </copy>
56

    
57
    <move todir="${extensionsDir}/${plugin}/">
58
            <fileset dir="${dist}" includes="**/**"/>
59
    </move>
60
  </target>
61
        
62
        <target name="import-build-number">
63
                <copy todir=".">
64
                          <fileset file="${buildNumberFile}"/>
65
                  </copy>
66
        </target>
67
        
68
                <target name="batch-build"
69
                                description="compile the sources, create the jar file"
70
                                depends="init,compile,create-jar,copy-data-files,move-to-andami">
71
                </target>
72

    
73
                <target name="compile" description="compile the source" >
74
                        <!-- Compile the Java code from ${src} to ${build} -->
75
                        <mkdir dir="${build}" />
76
                        <javac  srcdir="${src}"
77
                                destdir="${build}"
78
                                source="${JavaSourceVersion}"
79
                                target="${JavaTargetVersion}"
80
                                debug="${debug}"
81
                                debuglevel="${debuglevel}"
82
                                sourcepath="${compile-sourcepath}"
83
                                encoding="${encoding}">
84
                            <classpath refid="extCAD.compile-classpath"/>
85
                            <classpath refid="libFMap.compile-classpath"/>
86
                            <classpath refid="_fwAndami.compile-classpath"/>
87
                        </javac>
88
                </target>
89
                
90
                <target name="create-jar"
91
                                description="Creates the plugin jar">
92
                        <mkdir dir="${dist}"/>
93
                    <jar jarfile="${dist}/${jarName}" basedir="${build}"/>
94
                </target>
95
        
96
                <target name="copy-data-files">
97
                    <copy file="config/config.xml" todir="${dist}"/>
98
                        <copy file="build.number" todir="${dist}"/>
99
                        <copy todir="${dist}">
100
                                <fileset dir="config" includes="text*.properties"/>
101
                        </copy>
102
                        <copy todir="${dist}/images">
103
                                <fileset dir="images/" includes="*"/>
104
                        </copy>
105
                </target>
106
                
107
                <target name="move-to-andami">
108
                    <move todir="${extensionsDir}/${plugin}/">
109
                            <fileset dir="${dist}" includes="**/**"/>
110
                    </move>
111
                    <copy todir="${extensionsDir}/${mainplugin}/lib">
112
                            <fileset dir="./lib" includes="*.jar,*.zip"/>
113
                    </copy>
114
                </target>
115

    
116
  <target name="clean"
117
        description="clean up" >
118
    <!-- Delete the ${build} and ${dist} directory trees -->
119
    <delete dir="${build}"/>
120
    <delete dir="${dist}"/>
121
  </target>
122
</project>
123