Statistics
| Revision:

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

History | View | Annotate | Download (5.52 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 12272 cesar
        <property name="JavaSourceVersion" value="1.4"/>
27
        <property name="JavaTargetVersion" value="1.4"/>
28
        <property name="encoding" value="ISO_8859_1"/>
29 5641 cesar
30 3746 jaume
  <target name="init">
31
    <!-- Create the time stamp -->
32
    <tstamp/>
33
    <!-- Create the build directory structure used by compile -->
34
    <mkdir dir="${build}"/>
35
    <mkdir dir="${dist}"/>
36
37
  </target>
38
39 10187 jmvivo
          <target name="import-build-number">
40
                  <copy todir=".">
41
                          <fileset file="${buildNumberFile}"/>
42
                  </copy>
43
          </target>
44
45
46 3746 jaume
  <target name="generate-without-source"
47
                  description="generate the distribution without the source file">
48
    <!-- Create the distribution directory -->
49
    <mkdir dir="${dist}"/>
50
51
    <!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file -->
52
    <jar jarfile="${dist}/${plugin}.jar" basedir="${build}" includes="com/iver/cit/gvsig/**"
53
            excludes="com/iver/cit/gvsig/fmap/**"
54
    />
55
          <jar jarfile="${dist}/${fmapjar}.jar" basedir="${build}"
56
                            includes="com/iver/cit/gvsig/fmap/**" />
57
<!--                            excludes="com/iver/cit/gvsig/fmap/drivers/wms/**" />-->
58
          <copy file="config/config.xml" todir="${dist}"/>
59 10187 jmvivo
          <copy file="build.number" todir="${dist}"/>
60 3746 jaume
    <copy todir="${dist}">
61
            <fileset dir="config" includes="text*.properties"/>
62
    </copy>
63
          <copy todir="${dist}/images">
64
                      <fileset dir="images/" includes="*"/>
65
          </copy>
66
          <copy todir="${lib-dir}">
67
            <fileset dir="./lib" includes="*.jar,*.zip"/>
68
            <fileset dir="." includes=".keystore"/>
69
    </copy>
70 5641 cesar
          <move todir="${extensionsDir}/${mainplugin}/lib">
71 3746 jaume
                  <fileset dir="${dist}" includes="${gvsiglibjar}.jar"/>
72
                <fileset dir="${dist}" includes="${fmapjar}.jar"/>
73 5643 cesar
                <fileset dir="${dist}" includes="${remoteclientjar}"/>
74 3746 jaume
         </move>
75 5641 cesar
    <move todir="${extensionsDir}/${plugin}/">
76 3746 jaume
            <fileset dir="${dist}" includes="**/**"/>
77
    </move>
78
  </target>
79
80
81 5641 cesar
        <target name="batch-build"
82
                        description="compile the sources, create the jar file"
83
                        depends="compile,create-jar,copy-data-files,copy-libs,move-to-andami">
84
        </target>
85 3746 jaume
86 5641 cesar
        <target name="compile" description="compile the source" >
87
                <!-- Compile the Java code from ${src} to ${build} -->
88
                <mkdir dir="${build}" />
89
                <echo>${compile-classpath}</echo>
90
                <javac  srcdir="${src}"
91
                        destdir="${build}"
92 12272 cesar
                        source="${JavaSourceVersion}"
93
                        target="${JavaTargetVersion}"
94 6296 cesar
                        debug="${debug}"
95
                        debuglevel="${debuglevel}"
96 12272 cesar
                        classpath="${compile-classpath}"
97
                        encoding="${encoding}"/>
98 5641 cesar
        </target>
99
100
        <target name="create-jar"
101
                        description="Creates the plugin jar">
102
                <mkdir dir="${dist}/lib"/>
103 5662 cesar
            <jar jarfile="${dist}/${plugin}.jar" basedir="${build}" includes="com/iver/cit/gvsig/**"
104 5641 cesar
                    excludes="com/iver/cit/gvsig/fmap/**"
105
            />
106
                  <jar jarfile="${dist}/${fmapjar}.jar" basedir="${build}"
107
                                    includes="com/iver/cit/gvsig/fmap/**" />
108
        </target>
109 3746 jaume
110 5641 cesar
        <target name="copy-data-files">
111
            <copy file="config/config.xml" todir="${dist}"/>
112 10187 jmvivo
                <copy file="build.number" todir="${dist}"/>
113 5641 cesar
                <copy todir="${dist}">
114
                        <fileset dir="config" includes="text*.properties"/>
115
                </copy>
116
                <copy todir="${dist}/images">
117
                        <fileset dir="images/" includes="*"/>
118
                </copy>
119
        </target>
120
121
        <target name="copy-libs">
122
                  <copy todir="${extensionsDir}/${mainplugin}/lib">
123
                        <fileset file="${remoteclientjar}"/>
124
                 </copy>
125
        </target>
126
127
        <target name="move-to-andami">
128
                  <copy todir="${extensionsDir}/${mainplugin}/lib">
129 6296 cesar
                    <fileset dir="${lib}" includes="*.jar,*.zip"/>
130 5641 cesar
            </copy>
131
                  <move todir="${extensionsDir}/${mainplugin}/lib">
132
                        <fileset dir="${dist}" includes="${fmapjar}.jar"/>
133
                  </move>
134
            <move todir="${extensionsDir}/${plugin}/">
135
                    <fileset dir="${dist}" includes="**/**"/>
136
            </move>
137
        </target>
138
139
140
        <target name="clean"
141
                description="clean up" >
142
            <!-- Delete the ${build} and ${dist} directory trees -->
143
                <delete dir="${dist}"/>
144
                <delete dir="${build}"/>
145
        </target>
146 3746 jaume
</project>