summaryrefslogtreecommitdiff
path: root/management/cli/build-old.xml
blob: cb4e34b35d89cc7d7aae51cb1e17b7fd728e1bc7 (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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
<?xml version="1.0"?>
<!--
 -
 - 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.
 -
 -->

<!-- AMQP STAC Java build file -->

<project name="management-stac" default="jar" basedir=".">
    <property name="lib" value="${basedir}/lib"/>
    <property name="src" value="${basedir}/src"/>
    <property name="tests" value="${basedir}/test"/>
    <property name="classes" value="${basedir}/classes"/>
    <property name="testclasses" value="${basedir}/testclasses"/>
    <property name="dist" value="${basedir}/dist"/>
    <property name="amqp.root" value="${basedir}/../../clients_java"/>
    <property name="amqp.lib" value="${amqp.root}/lib"/>
    <property name="amqp.dist" value="${amqp.root}/dist"/>
    <property name="managementcore.root" value="${basedir}/../core"/>
    <property name="managementcore.dist" value="${managementcore.root}/dist"/>
    <property name="managementcore.lib" value="${managementcore.root}/lib"/>

    <!-- Setup details -->
    <target name="init">
        <tstamp>
            <format property="release" pattern="-dMMMyy" locale="en" timezone="GMT"/>
        </tstamp>

        <mkdir dir="${classes}"/>
        <mkdir dir="${testclasses}"/>
        <mkdir dir="${dist}"/>
    </target>

    <path id="core.classpath">
        <fileset dir="${lib}">
            <include name="**/*.jar"/>
        </fileset>
        <pathelement path="${classes}"/>
        <pathelement path="${testclasses}/"/>
        <fileset dir="${managementcore.dist}">
            <include name="**/*.jar"/>
        </fileset>
        <fileset dir="${managementcore.lib}">
            <include name="**/*.jar"/>
        </fileset>
        <fileset dir="${amqp.dist}">
            <include name="**/*.jar"/>
        </fileset>
        <fileset dir="${amqp.lib}">
            <include name="**/*.jar"/>
        </fileset>
    </path>

    <!-- Remove all built files -->
    <target name="clean" depends="init">
        <delete dir="${classes}"/>
        <delete dir="${dist}"/>
        <delete dir="${testclasses}"/>
    </target>

    <!-- Compile Java -->
    <target name="compile" depends="init">
        <javac destdir="${classes}" target="1.5" source="1.5" debug="on">
            <classpath refid="core.classpath"/>
            <src path="${src}"/>
        </javac>

        <copy todir="${classes}">
            <!-- copy any non java src files into the build tree, e.g. log4j.properties -->
            <fileset dir="${src}">
                <exclude name="**/*.java"/>
                <exclude name="**/package.html"/>
            </fileset>
        </copy>
    </target>


    <target name="compiletests" depends="compile">
        <javac destdir="${testclasses}" target="1.5" source="1.5" classpathref="core.classpath"
               debug="on">
            <src path="${tests}"/>
        </javac>

        <copy todir="${testclasses}">
            <!-- copy any non java src files into the build tree, e.g. log4j.properties -->
            <fileset dir="${tests}">
                <exclude name="**/*.java"/>
                <exclude name="**/package.html"/>
            </fileset>
        </copy>
    </target>

    <!-- Build jar archive -->
    <target name="jar" depends="compiletests">
        <mkdir dir="${dist}"/>
        <jar basedir="${classes}" jarfile="${dist}/amqp-stac.jar"/>
        <jar basedir="${testclasses}" jarfile="${dist}/amqp-stac-tests.jar"/>
    </target>


    <target name="javadoc" depends="compile, compiletests">
        <mkdir dir="${dist}/docs/api"/>
        <javadoc sourcepath="${src}" destdir="${dist}/docs/api"
                 packagenames="org.apache.qpid.*" classpathref="amqp.classpath" author="true"
                 version="true" windowTitle="AMQP STAC API" doctitle="AMQP STAC API"
                 footer="See &lt;a href=&quot;http://www.amqp.org&quot;&gt;www.amqp.org&lt;/a&gt; for more information."
                 use="true" verbose="false"/>
    </target>
</project>