Statistics
| Revision:

root / branches / v10 / extensions / extCAD / build.xml @ 7773

History | View | Annotate | Download (3.45 KB)

1
<project name="Generar extension en Andami" 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
        
24
  <target name="init">
25
    <!-- Create the time stamp -->
26
    <tstamp/>
27
    <!-- Create the build directory structure used by compile -->
28
    <mkdir dir="${build}"/>
29

    
30
  </target>
31

    
32

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

    
49
    <move todir="${extensionsDir}/${plugin}/">
50
            <fileset dir="${dist}" includes="**/**"/>
51
    </move>
52
  </target>
53
        
54
                <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

    
59
                <target name="compile" description="compile the source" >
60
                        <!-- Compile the Java code from ${src} to ${build} -->
61
                        <mkdir dir="${build}" />
62
                        <javac  srcdir="${src}"
63
                                destdir="${build}"
64
                                source="1.4"
65
                                target="1.4"
66
                                debug="${debug}"
67
                                debuglevel="${debuglevel}"
68
                                sourcepath="${compile-sourcepath}">
69
                            <classpath refid="extCAD.compile-classpath"/>
70
                            <classpath refid="libFMap.compile-classpath"/>
71
                            <classpath refid="_fwAndami.compile-classpath"/>
72
                        </javac>
73
                </target>
74
                
75
                <target name="create-jar"
76
                                description="Creates the plugin jar">
77
                        <mkdir dir="${dist}"/>
78
                    <jar jarfile="${dist}/${jarName}" basedir="${build}"/>
79
                </target>
80
        
81
                <target name="copy-data-files">
82
                    <copy file="config/config.xml" todir="${dist}"/>
83
                        <copy todir="${dist}">
84
                                <fileset dir="config" includes="text*.properties"/>
85
                        </copy>
86
                        <copy todir="${dist}/images">
87
                                <fileset dir="images/" includes="*"/>
88
                        </copy>
89
                </target>
90
                
91
                <target name="move-to-andami">
92
                    <move todir="${extensionsDir}/${plugin}/">
93
                            <fileset dir="${dist}" includes="**/**"/>
94
                    </move>
95
                    <copy todir="${extensionsDir}/${mainplugin}/lib">
96
                            <fileset dir="./lib" includes="*.jar,*.zip"/>
97
                    </copy>
98
                </target>
99

    
100
  <target name="clean"
101
        description="clean up" >
102
    <!-- Delete the ${build} and ${dist} directory trees -->
103
    <delete dir="${build}"/>
104
    <delete dir="${dist}"/>
105
  </target>
106
</project>
107