Statistics
| Revision:

svn-gvsig-desktop / trunk / libraries / libUI / build.xml @ 7005

History | View | Annotate | Download (4.57 KB)

1
<project name="libBeans" default="dist" basedir=".">
2
    <description>
3
        Generates Beans
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="lib"  location="lib"/>
10
  <property name="beans.home" location="${build}/org/gvsig/gui/beans"/>
11
  <property name="jarName" value="beans"/>
12
  <property name="installBaseDir" location="../_fwAndami"/>
13
  <property name="installDir" location="${installBaseDir}/lib"/>
14
        <property name="andami" location="../_fwAndami"/>
15
        <property name="andamiLibs" location="${andami}/lib"/>
16
        <property name="compile-classpath" value="${andamiLibs}/gvsig-i18n.jar"/>
17

    
18
  <target name="init">
19
    <!-- Create the time stamp -->
20
    <tstamp/>
21
    <!-- Create the build directory structure used by compile -->
22
    <mkdir dir="${build}"/>
23
  </target>
24

    
25
  <target name="dist" depends="init"
26
        description="generate the distribution" >
27
          <!-- pathconvert property="beans.home" pathsep=" ">
28
            <mapper>
29
              <chainedmapper>
30

31
                <flattenmapper />
32

33
                <globmapper from="*" to="lib/*" />
34
              </chainedmapper>
35
            </mapper>
36

37
            <path>
38

39
              <fileset dir="${beans.home}">
40
                <include name="**/*.class" />
41
              </fileset>
42
            </path>
43
         </pathconvert -->
44
        <!-- fileset dir="${beans.home}" includes="*.class/*.class" /-->
45
    <!-- Create the distribution directory -->
46
    <mkdir dir="${dist}"/>
47

    
48
          <!-- Copy the translations -->
49
        <mkdir dir="config"/>
50
    <copy todir="${build}/org/gvsig/gui/beans/resources/translations">
51
        <fileset dir="config" includes="*" />
52
    </copy>
53
    <!-- Put everything in ${build} into the cms-${DSTAMP}.jar file -->
54
    <jar jarfile="${dist}/${jarName}.jar" basedir="${build}">
55
            <manifest>
56
                    <section name="common">
57
                            <attribute name="Built-By" value="${user.name}"/>
58
                            <attribute name="Implementation-Title" value="$gvSIG Beans" />
59
                            <attribute name="Implementation-Version" value="${TODAY}" />
60
                            <attribute name="Implementation-Vendor" value="the gvSIG project" />
61
                    </section>
62
                    <!-- finally, use the magically generated libs path -->
63
            </manifest>
64
    </jar>
65
    <jar jarfile="${dist}/${jarName}.jar" basedir="." includes = "images/*.gif" update="true" />
66
          <copy todir="${dist}">
67
                  <fileset dir="${lib}" includes="**/**"/>
68
          </copy>
69
          <move todir="${installDir}">
70
                  <fileset dir="${dist}" includes="**/**"/>
71
    </move>
72
          <!--<eclipse.refreshLocal resource="." depth="infinite"/>
73
          <eclipse.refreshLocal resource="${installDir}" depth="infinite"/>-->
74
  </target>
75

    
76
  <target name="clean"
77
        description="clean up" >
78
    <!-- Delete the ${build} and ${dist} directory trees -->
79
    <delete dir="${build}"/>
80
    <delete dir="${dist}"/>
81
  </target>
82

    
83

    
84
        <target name="batch-build"
85
                        description="compile the sources, create the jar file"
86
                        depends="compile,copy-data-files,create-jar,move-to-installDir">
87
        </target>
88

    
89
        <target name="compile" description="compile the source">
90
                <!-- Create the time stamp -->
91
                <tstamp/>
92
                <!-- Create the build directory structure used by compile -->
93
                <mkdir dir="${build}"/>
94
                <!-- Compile the Java code from ${src} to ${build} -->
95
                <javac  srcdir="${src}"
96
                        destdir="${build}"
97
                        debug="${debug}"
98
                        debuglevel="${debuglevel}"
99
                        classpath="${compile-classpath}"/>
100
        </target>
101

    
102
        <target name="copy-data-files">
103
                <mkdir dir="config"/>
104
        <copy todir="${build}/org/gvsig/gui/beans/resources/translations">
105
                <fileset dir="config" includes="*" />
106
        </copy>
107
    </target>
108

    
109
        <target name="create-jar" description="Creates the jar file">
110
                <mkdir dir="${dist}"/>
111
                <jar jarfile="${dist}/${jarName}.jar" basedir="${build}">
112
                    <manifest>
113
                            <section name="common">
114
                                    <attribute name="Built-By" value="${user.name}"/>
115
                                    <attribute name="Implementation-Title" value="$gvSIG Beans" />
116
                                    <attribute name="Implementation-Version" value="${TODAY}" />
117
                                    <attribute name="Implementation-Vendor" value="the gvSIG project" />
118
                            </section>
119
                            <!-- finally, use the magically generated libs path -->
120
                    </manifest>
121
                </jar>
122
                <jar jarfile="${dist}/${jarName}.jar" basedir="." includes="images/*" update="true" />
123
        </target>
124

    
125
        <target name="move-to-installDir" description="Moves the build directory to andami">
126
                <copy todir="${dist}">
127
                        <fileset dir="${lib}" includes="**/**"/>
128
                </copy>
129
                <move todir="${installDir}">
130
                        <fileset dir="${dist}" includes="**/**"/>
131
                </move>
132

    
133
                <!--move todir="${installDir}">
134
                        <fileset dir="${dist}" includes="**/**"/>
135
                </move-->
136
        </target>
137

    
138
</project>
139