Statistics
| Revision:

svn-gvsig-desktop / tags / v2_0_Build_1214 / libraries / libGeocoding / build.xml @ 40002

History | View | Annotate | Download (2.77 KB)

1
<project name="libGeocoding" default="pattern-creation" basedir=".">
2
        <description>
3
        Build file for the geocoding library
4
    </description>
5

    
6
        <!-- set global properties for this build -->
7
        <property name="src" location="src" />
8
        <property name="build" location="bin" />
9
        <property name="dist" location="dist" />
10

    
11
        <!-- castor libraries -->
12
        <property name="castor.libraries" location="../_fwAndami/lib" />
13
        <property name="lib.castor" value="castor-0.9.5.3-xml.jar" />
14
        <property name="lib.xerces" value="xerces_2_5_0.jar" />
15

    
16

    
17

    
18
        <target name="init">
19
                <!-- Create the time stamp -->
20
                <tstamp />
21

    
22
                <!-- 
23
                :-)
24
                <splash imageurl="http://www.gvsig.gva.es/uploads/pics/Logo-gvSIG_150_14.gif"
25
                           useproxy="true"
26
                           showduration="5000"/>
27
        -->
28

    
29
                <echo>Compiling ${ant.project.name}...</echo>
30
        </target>
31

    
32

    
33
        <!-- ================================= 
34
          target: Generate Castor XML mappings              
35
         ================================= -->
36
        <target name="pattern-creation" depends="init" description="Create castor XML mappings(GeocodingPattern)">
37

    
38

    
39
                <delete dir="castor" />
40
                <mkdir dir="castor" />
41
                <mkdir dir="castor/src" />
42
                <mkdir dir="castor/bin" />
43

    
44
                <echo>Creating castor mapping java classes...</echo>
45
                <java classname="org.exolab.castor.builder.SourceGenerator">
46
                        <classpath>
47
                                <pathelement path="${castor.libraries}/${lib.castor}" />
48
                                <pathelement path="${castor.libraries}/${lib.xerces}" />
49
                        </classpath>
50
                        <arg value="-i" />
51
                        <arg value="${basedir}/schemas/PatternGeoco.xsd" />
52
                        <arg value="-package" />
53
                        <arg value="org.gvsig.geocoding.patterns.geocoding" />
54
                        <arg value="-dest" />
55
                        <arg value="castor/src" />
56
                </java>
57

    
58
                <java classname="org.exolab.castor.builder.SourceGenerator">
59
                        <classpath>
60
                                <pathelement path="${castor.libraries}/${lib.castor}" />
61
                                <pathelement path="${castor.libraries}/${lib.xerces}" />
62
                        </classpath>
63
                        <arg value="-i" />
64
                        <arg value="${basedir}/schemas/PatternNorm.xsd" />
65
                        <arg value="-package" />
66
                        <arg value="org.gvsig.geocoding.patterns.normalization" />
67
                        <arg value="-dest" />
68
                        <arg value="castor/src" />
69
                </java>
70

    
71
                <echo>Compiling java classes...</echo>
72
                <javac srcdir="castor/src" destdir="castor/bin" debug="off">
73
                        <classpath>
74
                                <pathelement path="${castor.libraries}/${lib.castor}" />
75
                                <pathelement path="${castor.libraries}/${lib.xerces}" />
76
                        </classpath>
77
                </javac>
78

    
79
                <echo>Creating jar file...</echo>
80
                <mkdir dir="lib" />
81
                <jar jarfile="./lib/org.gvsig.geocoding.xml.jar">
82
                        <fileset dir="castor/bin" id="bin">
83
                                <include name="**" />
84
                        </fileset>
85
                        <fileset dir="castor/src" id="src">
86
                                <include name="**" />
87
                        </fileset>
88
                </jar>
89

    
90
                <delete dir="castor" />
91
        </target>
92
</project>