summaryrefslogtreecommitdiff
path: root/java/build.xml
blob: 3d0953f93b4a7b055e652089495e1d11d8cba89d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?xml version="1.0"?>
<project name="EZIPC Server Test" basedir="." default="jar">
    <property name="version">0.1</property>
    <property name="dir.src">sources</property>
    <property name="dir.lib">libraries</property>
    <property name="dir.build">build</property>
    <property name="dir.build.classes">${dir.build}/classes</property>
    <property name="dir.build.javadoc">${dir.build}/javadoc</property>
    <property name="file.jar">${dir.build}/server-${version}.jar</property>

    <path id="external.classpath">
        <fileset dir="${dir.lib}">
            <include name="**/*.jar"/>
        </fileset>
    </path>

    <target name="clean">
        <delete dir="${dir.build}"/>
    </target>

    <target name="init">
        <mkdir dir="${dir.build}"/>
        <mkdir dir="${dir.build.classes}"/>
    </target>

    <target name="compile" depends="init">
        <echo>Compiling Java source</echo>

        <javac classpathref="external.classpath"
               srcdir="${dir.src}"
               destdir="${dir.build.classes}"/>
    </target>

    <target name="jar" depends="compile">
        <echo>Making JAR file</echo>

        <manifest file="build/MANIFEST.MF">
            <attribute name="Main-Class" value="EzIPCServerTest"/>
        </manifest>

        <jar manifest="build/MANIFEST.MF"
             basedir="${dir.build.classes}"
             file="${file.jar}">
            <zipgroupfileset dir="${dir.lib}">
                <include name="**/*.jar"/>
            </zipgroupfileset>
        </jar>
    </target>

    <target name="javadoc">
        <echo>Making JavaDoc from source</echo>

        <javadoc sourcepath="${dir.src}" destdir="${dir.build.javadoc}">
        </javadoc>
    </target>
</project>