summaryrefslogtreecommitdiff
path: root/qpid/tools/src/java/build.xml
diff options
context:
space:
mode:
authorFraser Adams <fadams@apache.org>2013-04-08 15:19:04 +0000
committerFraser Adams <fadams@apache.org>2013-04-08 15:19:04 +0000
commit797fcaf14ca1bfeb5778cbe526b3110f256862f2 (patch)
tree052572627ac304f44bdf07458120fedf4e195ba4 /qpid/tools/src/java/build.xml
parent7f1f7f7a01cfcbb892285dc3a7d9372d1fb1ff43 (diff)
downloadqpid-python-797fcaf14ca1bfeb5778cbe526b3110f256862f2.tar.gz
QPID-3675: Java QMF2 API, REST API, QMF GUI and Java Broker QMF Management Plugin added to <qpid>/tools/src/java
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1465662 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/tools/src/java/build.xml')
-rw-r--r--qpid/tools/src/java/build.xml241
1 files changed, 241 insertions, 0 deletions
diff --git a/qpid/tools/src/java/build.xml b/qpid/tools/src/java/build.xml
new file mode 100644
index 0000000000..1b19abd173
--- /dev/null
+++ b/qpid/tools/src/java/build.xml
@@ -0,0 +1,241 @@
+<?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.
+ -
+ -->
+
+<project name="QMF2 API Implementation" default="api" basedir=".">
+ <!-- =================================================================== -->
+ <!-- Note that this requires the QPID_HOME environment variable -->
+ <!-- to be set and it installs the plugin to $QPID_HOME/lib/plugins -->
+ <!-- =================================================================== -->
+
+ <property environment="env"/>
+ <property name="qpid.home" location="${env.QPID_HOME}"/>
+ <property name="qpid.lib" location="${qpid.home}/lib"/>
+ <property name="qpid.lib.plugins" location="${qpid.lib}/plugins"/>
+
+ <!-- =================================================================== -->
+ <!-- Builds the QMF2 and REST APIs -->
+ <!-- Use this if you have Qpid version 0.12+ as this doesn't override -->
+ <!-- the now working latest version of AMQMessageDelegate_0_10. -->
+ <!-- =================================================================== -->
+ <target name="api" depends="main-jar, restapi-jar, api-doc">
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- Builds the QMF2 and REST APIs and the AMQMessageDelegate_0_10 patch.-->
+ <!-- Use this if you have a Qpid version < 0.12 as it includes the patch -->
+ <!-- for AMQMessageDelegate_0_10.java that is needed to work with older -->
+ <!-- Qpid versions. N.B. This task won't compile on later Qoid versions. -->
+ <!-- =================================================================== -->
+ <target name="api-patched" depends="main-jar, patch-jar, restapi-jar, api-doc">
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- Builds the QMF2 and REST APIs plus the QMF2 Agent Plugin to enable -->
+ <!-- the Java Broker to talk QMF2. -->
+ <!-- Note that this task only compiles on Qpid Java version > 0.20 -->
+ <!-- =================================================================== -->
+ <target name="all" depends="main-jar, restapi-jar, qpid-broker-plugins-management-qmf2-jar, all-doc">
+ <mkdir dir="${qpid.lib.plugins}"/>
+
+ <copy file="build/lib/qmf2.jar" todir="${qpid.lib.plugins}"/>
+ <copy file="build/lib/qpid-broker-plugins-management-qmf2.jar" todir="${qpid.lib.plugins}"/>
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- Compiles the main API code -->
+ <!-- =================================================================== -->
+ <target name="main">
+ <mkdir dir="build/scratch/qmf2/classes"/>
+
+ <javac srcdir="src/main/java"
+ destdir="build/scratch/qmf2/classes"
+ debug="off"
+ deprecation="on"
+ includeantruntime="false"
+ optimize="on">
+ <classpath location="${qpid.lib}/qpid-all.jar"/>
+ </javac>
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- Compiles the test code -->
+ <!-- =================================================================== -->
+ <target name="test" depends="main">
+ <mkdir dir="build/scratch/qmf2/testclasses"/>
+
+ <javac srcdir="src/test/java"
+ destdir="build/scratch/qmf2/testclasses"
+ debug="off"
+ deprecation="on"
+ includeantruntime="false"
+ optimize="on">
+ <classpath>
+ <pathelement location="${qpid.lib}/qpid-all.jar"/>
+ <pathelement location="build/scratch/qmf2/classes"/>
+ </classpath>
+ </javac>
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- Compiles the patch needed for Qpid versions older than 0.12 -->
+ <!-- =================================================================== -->
+ <target name="patch">
+ <mkdir dir="build/scratch/patch"/>
+
+ <javac srcdir="src/patch/java"
+ destdir="build/scratch/patch"
+ debug="off"
+ deprecation="on"
+ includeantruntime="false"
+ optimize="on">
+ <classpath location="${qpid.lib}/qpid-all.jar"/>
+ </javac>
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- Compiles the Java Broker QMF2 Agent Plugin -->
+ <!-- =================================================================== -->
+ <target name="qpid-broker-plugins-management-qmf2">
+ <mkdir dir="build/scratch/qpid-broker-plugins-management-qmf2"/>
+
+ <javac srcdir="src/qpid-broker-plugins-management-qmf2/java"
+ destdir="build/scratch/qpid-broker-plugins-management-qmf2"
+ debug="off"
+ deprecation="on"
+ includeantruntime="false"
+ optimize="on">
+ <classpath>
+ <pathelement location="${qpid.lib}/qpid-all.jar"/>
+ <pathelement location="build/scratch/qmf2/classes"/>
+ </classpath>
+ </javac>
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- Compiles the HTTP REST API Server -->
+ <!-- =================================================================== -->
+ <target name="restapi" depends="main">
+ <mkdir dir="build/scratch/restapi"/>
+
+ <javac srcdir="src/restapi/java"
+ destdir="build/scratch/restapi"
+ debug="off"
+ deprecation="on"
+ includeantruntime="false"
+ optimize="on">
+ <classpath>
+ <pathelement location="${qpid.lib}/qpid-all.jar"/>
+ <pathelement location="build/scratch/qmf2/classes"/>
+ </classpath>
+ </javac>
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- Generates the main jars -->
+ <!-- =================================================================== -->
+ <target name="main-jar" depends="main, test">
+ <mkdir dir="build/lib"/>
+
+ <jar destfile="build/lib/qmf2.jar" basedir="build/scratch/qmf2/classes">
+ </jar>
+
+ <jar destfile="build/lib/qmf2test.jar" basedir="build/scratch/qmf2/testclasses">
+ </jar>
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- Generates the jar for the patch needed by Qpid versions < 0.12 -->
+ <!-- =================================================================== -->
+ <target name="patch-jar" depends="patch">
+ <mkdir dir="build/lib"/>
+ <jar destfile="build/lib/qpid-client-patch.jar" basedir="build/scratch/patch">
+ </jar>
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- Generates the jar for the Java Broker QMF2 Agent Plugin -->
+ <!-- =================================================================== -->
+ <target name="qpid-broker-plugins-management-qmf2-jar" depends="qpid-broker-plugins-management-qmf2">
+ <mkdir dir="build/lib"/>
+ <jar destfile="build/lib/qpid-broker-plugins-management-qmf2.jar"
+ basedir="build/scratch/qpid-broker-plugins-management-qmf2">
+
+ <service type="org.apache.qpid.server.plugin.PluginFactory"
+ provider="org.apache.qpid.server.qmf2.QmfManagementFactory"/>
+ </jar>
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- Generates the jar for the the HTTP REST API Server -->
+ <!-- =================================================================== -->
+ <target name="restapi-jar" depends="restapi">
+ <mkdir dir="build/lib"/>
+ <jar destfile="build/lib/restapi.jar" basedir="build/scratch/restapi">
+ </jar>
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- Generates Javadoc -->
+ <!-- =================================================================== -->
+ <target name="api-doc">
+ <javadoc packagenames="org.apache.qpid.qmf2.*, org.apache.qpid.restapi.*"
+ sourcepath="src/main/java:src/restapi/java"
+ destdir="docs/api"
+ windowtitle="QMF2 API">
+ </javadoc>
+ </target>
+
+ <target name="all-doc">
+ <javadoc packagenames="org.apache.qpid.qmf2.*, org.apache.qpid.restapi.*, org.apache.qpid.server.qmf2.*"
+ sourcepath="src/main/java:src/restapi/java:src/qpid-broker-plugins-management-qmf2/java"
+ destdir="docs/api"
+ windowtitle="QMF2 API">
+ </javadoc>
+ </target>
+
+
+ <!-- =================================================================== -->
+ <!-- Cleans up classes but keeps jars and docs around -->
+ <!-- =================================================================== -->
+ <target name="clean">
+ <delete includeemptydirs="true">
+ <fileset dir="." includes="**/*.class"/>
+ </delete>
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- Removes everything except the sources enabling clean build. -->
+ <!-- =================================================================== -->
+ <target name="cleanall" depends="clean">
+ <delete includeemptydirs="true">
+ <fileset dir="." includes="**/*.*~ **/*~" defaultexcludes="no"/>
+
+ <fileset dir="${qpid.lib.plugins}" includes="qpid-broker-plugins-management-qmf2.jar qmf2.jar"
+ defaultexcludes="no"/>
+ </delete>
+
+ <delete dir="build"/>
+ <delete dir="docs"/>
+ </target>
+
+</project>
+