Statistics
| Revision:

root / trunk / extensions / extWMS / build.xml @ 11445

History | View | Annotate | Download (5.37 KB)

1 3746 jaume
<project name="Generar extension en Andami" default="generate-without-source" basedir=".">
2
    <description>
3
        Instala el plugin en Andami
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 6296 cesar
  <property name="lib" location="lib" />
10 3746 jaume
  <property name="mainplugin" value="com.iver.cit.gvsig"/>
11
  <property name="plugin" value="com.iver.cit.gvsig.wms"/>
12
  <property name="gvsiglibjar" value="gvsig-wms"/>
13
  <property name="fmapjar" value="fmap-wms"/>
14
  <property name="driverjar" value="wms"/>
15 5641 cesar
  <property name="andami" location="../_fwAndami"/>
16
  <property name="extensionsDir" location="${andami}/gvSIG/extensiones"/>
17
  <property name="drivers-dir" location="${extensionsDir}/${mainplugin}/drivers" />
18
  <property name="lib-dir" location="${extensionsDir}/${mainplugin}/lib"/>
19
        <property name="andamiLibs" location="${andami}/lib" />
20
        <property name="andamiJar" location="${andami}/andami.jar"/>
21
        <property name="fmapLibs" location="../libFMap/lib" />
22
        <property name="remoteclientjar" value="${fmapLibs}/remote-clients.jar"/>
23
        <property name="gvsigJar" location="${extensionsDir}/${mainplugin}/lib/${mainplugin}.jar"/>
24 9629 cesar
        <property name="fmapJar" location="../libFMap/dist/lib/fmap.jar" />
25 10685 cesar
        <property name="compile-classpath" value="${andamiJar}:${gvsigJar}:${andamiLibs}/beans.jar:${andamiLibs}/castor-0.9.5.3-xml.jar:${fmapLibs}/cms.jar:${fmapLibs}/driver-manager-1.1.jar:${fmapJar}:${fmapLibs}/gdbms-0.8-SNAPSHOT.jar:${lib}/gt2-wms.jar:${fmapLibs}/gvsig-exceptions.jar:${andamiLibs}/iver-utiles.jar:${fmapLibs}/jts-1.7.jar:${andamiLibs}/kxml2.jar:${andamiLibs}/log4j-1.2.8.jar:${fmapLibs}/remote-clients.jar:${andamiLibs}/tempFileManager.jar" />
26 5641 cesar
<!--                ${fmapLibs}/geoapi-2.0.jar:${fmapLibs}/gt2-main.jar -->
27
28 3746 jaume
  <target name="init">
29
    <!-- Create the time stamp -->
30
    <tstamp/>
31
    <!-- Create the build directory structure used by compile -->
32
    <mkdir dir="${build}"/>
33
    <mkdir dir="${dist}"/>
34
35
  </target>
36
37 10187 jmvivo
          <target name="import-build-number">
38
                  <copy todir=".">
39
                          <fileset file="${buildNumberFile}"/>
40
                  </copy>
41
          </target>
42
43
44 3746 jaume
  <target name="generate-without-source"
45
                  description="generate the distribution without the source file">
46
    <!-- Create the distribution directory -->
47
    <mkdir dir="${dist}"/>
48
49
    <!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file -->
50
    <jar jarfile="${dist}/${plugin}.jar" basedir="${build}" includes="com/iver/cit/gvsig/**"
51
            excludes="com/iver/cit/gvsig/fmap/**"
52
    />
53
          <jar jarfile="${dist}/${fmapjar}.jar" basedir="${build}"
54
                            includes="com/iver/cit/gvsig/fmap/**" />
55
<!--                            excludes="com/iver/cit/gvsig/fmap/drivers/wms/**" />-->
56
          <copy file="config/config.xml" todir="${dist}"/>
57 10187 jmvivo
          <copy file="build.number" todir="${dist}"/>
58 3746 jaume
    <copy todir="${dist}">
59
            <fileset dir="config" includes="text*.properties"/>
60
    </copy>
61
          <copy todir="${dist}/images">
62
                      <fileset dir="images/" includes="*"/>
63
          </copy>
64
          <copy todir="${lib-dir}">
65
            <fileset dir="./lib" includes="*.jar,*.zip"/>
66
            <fileset dir="." includes=".keystore"/>
67
    </copy>
68 5641 cesar
          <move todir="${extensionsDir}/${mainplugin}/lib">
69 3746 jaume
                  <fileset dir="${dist}" includes="${gvsiglibjar}.jar"/>
70
                <fileset dir="${dist}" includes="${fmapjar}.jar"/>
71 5643 cesar
                <fileset dir="${dist}" includes="${remoteclientjar}"/>
72 3746 jaume
         </move>
73 5641 cesar
    <move todir="${extensionsDir}/${plugin}/">
74 3746 jaume
            <fileset dir="${dist}" includes="**/**"/>
75
    </move>
76
  </target>
77
78
79 5641 cesar
        <target name="batch-build"
80
                        description="compile the sources, create the jar file"
81
                        depends="compile,create-jar,copy-data-files,copy-libs,move-to-andami">
82
        </target>
83 3746 jaume
84 5641 cesar
        <target name="compile" description="compile the source" >
85
                <!-- Compile the Java code from ${src} to ${build} -->
86
                <mkdir dir="${build}" />
87
                <echo>${compile-classpath}</echo>
88
                <javac  srcdir="${src}"
89
                        destdir="${build}"
90 7786 cesar
                        source="1.4"
91
                        target="1.4"
92 6296 cesar
                        debug="${debug}"
93
                        debuglevel="${debuglevel}"
94 5641 cesar
                        classpath="${compile-classpath}"/>
95
        </target>
96
97
        <target name="create-jar"
98
                        description="Creates the plugin jar">
99
                <mkdir dir="${dist}/lib"/>
100 5662 cesar
            <jar jarfile="${dist}/${plugin}.jar" basedir="${build}" includes="com/iver/cit/gvsig/**"
101 5641 cesar
                    excludes="com/iver/cit/gvsig/fmap/**"
102
            />
103
                  <jar jarfile="${dist}/${fmapjar}.jar" basedir="${build}"
104
                                    includes="com/iver/cit/gvsig/fmap/**" />
105
        </target>
106 3746 jaume
107 5641 cesar
        <target name="copy-data-files">
108
            <copy file="config/config.xml" todir="${dist}"/>
109 10187 jmvivo
                <copy file="build.number" todir="${dist}"/>
110 5641 cesar
                <copy todir="${dist}">
111
                        <fileset dir="config" includes="text*.properties"/>
112
                </copy>
113
                <copy todir="${dist}/images">
114
                        <fileset dir="images/" includes="*"/>
115
                </copy>
116
        </target>
117
118
        <target name="copy-libs">
119
                  <copy todir="${extensionsDir}/${mainplugin}/lib">
120
                        <fileset file="${remoteclientjar}"/>
121
                 </copy>
122
        </target>
123
124
        <target name="move-to-andami">
125
                  <copy todir="${extensionsDir}/${mainplugin}/lib">
126 6296 cesar
                    <fileset dir="${lib}" includes="*.jar,*.zip"/>
127 5641 cesar
            </copy>
128
                  <move todir="${extensionsDir}/${mainplugin}/lib">
129
                        <fileset dir="${dist}" includes="${fmapjar}.jar"/>
130
                  </move>
131
            <move todir="${extensionsDir}/${plugin}/">
132
                    <fileset dir="${dist}" includes="**/**"/>
133
            </move>
134
        </target>
135
136
137
        <target name="clean"
138
                description="clean up" >
139
            <!-- Delete the ${build} and ${dist} directory trees -->
140
                <delete dir="${dist}"/>
141
                <delete dir="${build}"/>
142
        </target>
143 3746 jaume
</project>