Statistics
| Revision:

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

History | View | Annotate | Download (5.19 KB)

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