Subversion Repositories wimsdev

Rev

Rev 13456 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
3653 schaersvoo 1
<?xml version="1.0" encoding="UTF-8" ?>
2
 
3
<!--
4
 
5
        This is the Ant build script for WClock.jar.
6
        to build ,type:
7
        ant -v
8
        to clean , type
9
        ant -v clean
10
 
11
-->
12
 
13
 
14
<project name="WClock" default="jar" basedir=".">
15
 
16
        <description>WClock build file</description>
17
        <!-- Set global properties for this build. -->
18
        <property name="version"          value="0.1"/>
19
        <property name="source-dir"       location="src"/>
20
        <property name="build"        location="build"/>
21
        <property name="dist"         location="dist"/>
6293 schaersvoo 22
        <property name="debug"            value="false"/>
3653 schaersvoo 23
        <property name="debuglevel"       value="lines,var,source"/>
13456 georgesk 24
        <property name="java-level"       value="1.6"/>
3653 schaersvoo 25
 
26
        <!-- Compiles the classes.  -->
27
        <target name="compile" description="Compile the source">
28
                <delete includeEmptyDirs="true" quiet="true" dir="${build}"/>
29
                <mkdir dir="${build}"/>
30
                <javac srcdir="${source-dir}" destdir="${build}"
31
                    deprecation="yes" debug="${debug}" debuglevel="${debuglevel}"
32
                    source="${java-level}" target="${java-level}"/>
33
 
34
        </target>
13459 schaersvoo 35
        <presetdef name="javac">
36
            <javac encoding="UTF-8" />
37
        </presetdef>
3653 schaersvoo 38
 
39
        <!-- Creates the jar file. -->
40
 
41
        <target name="jar" depends="compile" description="Create WClock jar">
42
                <mkdir dir="${dist}"/> 
43
                <jar destfile="${dist}/WClock.jar">
44
                        <fileset dir="${build}"/>
45
                        <manifest>
46
                                <attribute name="Specification-Title" value="WClock"/>
47
                                <attribute name="Specification-Version" value="${version}"/>
48
                                <attribute name="Implementation-Title" value="WClock"/>
49
                                <attribute name="Implementation-Version" value="${version}"/>
50
                                <section name="WClock">
51
                                        <attribute name="Specification-Title" value="WClock"/>
52
                                        <attribute name="Specification-Version" value="${version}"/>
53
                                        <attribute name="Implementation-Title" value="WClock"/>
54
                                        <attribute name="Implementation-Version" value="${version}"/>
55
                                </section>
56
                        </manifest>
57
 
58
                </jar>
59
        </target>
60
        <target name="clean" description="clean up">
61
        <!-- Delete the ${build} and ${dist} directory trees -->
62
            <delete dir="./build"/>
63
            <delete dir="./dist"/>
64
        </target>
65
 
66
 
67
</project>