| Apache Qpid > Index > Qpid Java Documentation > Qpid Java How To > Qpid Java Build How To |
Home
Download
Getting Started
Documentation
Mailing Lists
Issue Reporting
FAQ/How to
Getting Involved
Qpid Integrated with..
Source Repository
Building Qpid
Developer Pages
QMF
People
License
Project Status
Acknowledgments
What is AMQP ?
AMQP Specification Download

Firstly, check the source for Qpid out of our subversion repository:
https://svn.apache.org/repos/asf/qpid/trunk
For the broker code you need JDK 1.5.0_15 or later. You should set JAVA_HOME and include the bin directory in your PATH.
Check it's ok by executing java -v !
If you are wanting to run the python tests against the broker you will of course need a version of python.
Our build system has reverted to ant as of May 2008.
The ant target 'help' will tell you what you need to know about the build system.
Currently the Qpid java project builds using ant.
The ant build system is set up in a modular way, with a top level build script and template for module builds and then a module level build script which inherits from the template.
So, at the top level there are:
| File | Description |
|---|---|
| build.xml | Top level build file for the project which defines all the build targets |
| common.xml | Common properties used throughout the build system |
| module.xml | Template used by all modules which sets up properties for module builds |
Then, in each module subdirectory there is:
| File | Description |
|---|---|
| build.xml | Defines all the module values for template properties |
The main build targets you are probably interested in are:
| Target | Description |
|---|---|
| build | Builds all source code for Qpid |
| test | Runs the testsuite for Qpid |
So, if you just want to compile everything you should run the build target in the top level build.xml file.
If you want to build an installable version of Qpid, run the archive task from the top level build.xml file.
If you want to compile an individual module, simply run the build target from the appropriate module e.g. to compile the broker source
1. Run the ant build from the root directory of Java trunk.
2. New project -> create from existing file system for broker, common, client, junit-toolkit, perftests, systests and each directory under management
4. Add the contents of lib/ to the build path
5. Setup Generated Code
6. Setup Dependencies
The Broker and Common packages both depend on generated code. After running 'ant' the build/scratch directory will contain this generated code.
For the broker module add build/scratch/broker/src
For the common module add build/scratch/common/src
These dependencies are correct at the time of writting however, if things are not working you can check the dependencies by looking in the modules build.xml file:
for i in `find . -name build.xml` ; do echo "$i:"; grep module.depends $i ; done
The module.depend value will detail which other modules are dependencies.
broker
client
systest
perftests
management/eclipse-plugin
management/console
management/agent
management/tools/qpid-cli
management/client
integrationtests
testkit
tools
client/examples
broker-plugins
If you want to run your built Qpid package, see our Getting Started Guide for details of how to do that.
If you want to run our tests, you can use the ant test or testreport (produces a useful report) targets.