summaryrefslogtreecommitdiff
path: root/java/management/tools/qpid-cli/build.xml
blob: 41f0b5101e04a5d01cfcbc0d347ee45e30304d9b (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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<!--
 -
 - Licensed to the Apache Software Foundation (ASF) under one
 - or more contributor license agreements.  See the NOTICE file
 - distributed with this work for additional information
 - regarding copyright ownership.  The ASF licenses this file
 - to you under the Apache License, Version 2.0 (the
 - "License"); you may not use this file except in compliance
 - with the License.  You may obtain a copy of the License at
 - 
 -   http://www.apache.org/licenses/LICENSE-2.0
 - 
 - Unless required by applicable law or agreed to in writing,
 - software distributed under the License is distributed on an
 - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 - KIND, either express or implied.  See the License for the
 - specific language governing permissions and limitations
 - under the License.
 -
 -->
<project name="lahirugsoc2008">
    <import file="../../../module.xml"/>
    <property name="module.depends" value="common"/>
    <property name="src.dir" value="src"/>
    <property name="build.dir" value="${module.build}"/>
    <property name="build.src.dir" value="${build.dir}/main/"/>
    <property name="build.test.dir" value="${build.dir}/test/"/>
    <property name="build.src.classes.dir" value="${build.src.dir}/classes"/>
    <property name="build.test.classes.dir" value="${build.test.dir}/classes"/>
    <property name="jar.dir" value="${build.dir}/jar"/>
    <property name="lib.dir" value="lib"/>
    <property name="test.dir" value="test"/>
    <property name="dependency1" value="jline-0.9.94.jar"/>
    <property name="dependency2" value="junit-4.4.jar"/>
    <property name="project.name" value="qpid-cli"/>
    <property name="project.version" value="1.0"/>
    <property name="target.name" value="${project.name}-${project.version}.jar"/>
    <property name="target.jar" location="${jar.dir}/${target.name}"/>
    <property name="build.failed" location="${build.test.dir}/results/FAILED"/>
    <property name="test.suite" value="org.apache.qpid.AllTest"/>
    <property name="test.report.dir" value="${build.test.dir}/reports"/>
    <target name="init">
        <mkdir dir="${build.src.classes.dir}" />
        <mkdir dir="${build.test.classes.dir}"/>
        <mkdir dir="${jar.dir}"/>
        <copy file="lib/${dependency1}" todir="${project.root}/lib"/>
        <copy file="lib/${dependency2}" todir="${project.root}/lib"/>
        <copy file="bin/qpid-cli" todir="${project.root}/bin"/>
        <copy file="bin/qpid-cli.bat" todir="${project.root}/bin"/>
    </target>
    <target name="clean">
        <delete dir="${build.src.dir}"/>
        <delete dir="${build.test.dir}"/>
        <delete dir="${jar.dir}"/>
    </target>
    <target name="compile" depends="init">
        <javac srcdir="${src.dir}"
               destdir="${build.src.classes.dir}">
            <classpath>
                <pathelement path="${lib.dir}/${dependency1}"/>
            </classpath>
        </javac>
    </target>
    <target name="compile-tests" depends="compile">
        <javac srcdir="${test.dir}"
               destdir="${build.test.classes.dir}"
               debug="true"
               includeAntRuntime="true">
            <classpath>
                <pathelement path="${lib.dir}/${dependency2}"/>
                <pathelement path="${build.src.classes.dir}"/>
            </classpath>
        </javac>
    </target>
    <target name="jar" depends="compile">
        <jar destfile="${target.jar}" duplicate="preserve"
             compress="true">
            <fileset dir="${build.src.classes.dir}"/>
        </jar>
    </target>
    <target name="test" depends="compile-tests">
        <junit printsummary="true">
            <classpath>
                <pathelement path="${build.test.classes.dir}"/>
                <pathelement path="${build.src.classes.dir}"/>
                <pathelement path="${lib.dir}/${dependency2}"/>
            </classpath>
            <formatter type="brief" usefile="false"/>
            <test name="${test.suite}"/>
        </junit>
    </target>
</project>