qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From conflue...@apache.org
Subject [CONF] Apache Qpid > Qpid Java Build How To
Date Mon, 31 Aug 2009 14:52:01 GMT
<html>
<head>
    <base href="http://cwiki.apache.org/confluence">
            <link rel="stylesheet" href="/confluence/s/1519/1/1/_/styles/combined.css?spaceKey=qpid&amp;forWysiwyg=true"
type="text/css">
    </head>
<body style="background-color: white" bgcolor="white">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
     <h2><a href="http://cwiki.apache.org/confluence/display/qpid/Qpid+Java+Build+How+To">Qpid
Java Build How To</a></h2>
     <h4>Page <b>edited</b> by             <a href="http://cwiki.apache.org/confluence/display/~robbie">Robbie
Gemmell</a>
    </h4>
     
          <br/>
     <div class="notificationGreySide">
         <h1><a name="QpidJavaBuildHowTo-BuildInstructionsGeneral"></a>Build
Instructions - General</h1>

<h2><a name="QpidJavaBuildHowTo-Checkoutthesource"></a>Check out the source</h2>

<p>Firstly, check the source for Qpid out of our subversion repository:</p>

<p><a href="https://svn.apache.org/repos/asf/qpid/trunk" rel="nofollow">https://svn.apache.org/repos/asf/qpid/trunk</a></p>

<h2><a name="QpidJavaBuildHowTo-Prerequisites"></a>Prerequisites</h2>

<p>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.</p>

<p>Check it's ok by executing java -v !</p>

<p>If you are wanting to run the python tests against the broker you will of course
need a version of python.</p>

<h1><a name="QpidJavaBuildHowTo-BuildInstructionsTrunk"></a>Build Instructions
- Trunk </h1>

<p>Our build system has reverted to ant as of May 2008.</p>

<p>The ant target 'help' will tell you what you need to know about the build system.</p>

<h2><a name="QpidJavaBuildHowTo-AntBuildScripts"></a>Ant Build Scripts</h2>

<p>Currently the Qpid java project builds using ant.</p>

<p>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.</p>

<p>So, at the top level there are:</p>

<table class='confluenceTable'><tbody>
<tr>
<th class='confluenceTh'>File</th>
<th class='confluenceTh'>Description</th>
</tr>
<tr>
<td class='confluenceTd'>build.xml</td>
<td class='confluenceTd'>Top level build file for the project which defines all the
build targets</td>
</tr>
<tr>
<td class='confluenceTd'>common.xml</td>
<td class='confluenceTd'>Common properties used throughout the build system</td>
</tr>
<tr>
<td class='confluenceTd'>module.xml</td>
<td class='confluenceTd'>Template used by all modules which sets up properties for module
builds</td>
</tr>
</tbody></table>

<p>Then, in each module subdirectory there is:</p>

<table class='confluenceTable'><tbody>
<tr>
<th class='confluenceTh'>File</th>
<th class='confluenceTh'>Description</th>
</tr>
<tr>
<td class='confluenceTd'>build.xml</td>
<td class='confluenceTd'>Defines all the module values for template properties</td>
</tr>
</tbody></table>

<h2><a name="QpidJavaBuildHowTo-Buildtargets"></a>Build targets</h2>

<p>The main build targets you are probably interested in are:</p>

<table class='confluenceTable'><tbody>
<tr>
<th class='confluenceTh'>Target</th>
<th class='confluenceTh'>Description</th>
</tr>
<tr>
<td class='confluenceTd'>build</td>
<td class='confluenceTd'>Builds all source code for Qpid </td>
</tr>
<tr>
<td class='confluenceTd'>test</td>
<td class='confluenceTd'>Runs the testsuite for Qpid </td>
</tr>
</tbody></table>

<p>So, if you just want to compile everything you should run the build target in the
top level build.xml file.</p>

<p>If you want to build an installable version of Qpid, run the archive task from the
top level build.xml file.</p>

<p>If you want to compile an individual module, simply run the build target from the
appropriate module e.g. to compile the broker source</p>

<h2><a name="QpidJavaBuildHowTo-ConfiguringEclipse"></a>Configuring Eclipse</h2>

<p>1. Run the ant build from the root directory of Java trunk.<br/>
2. New project -&gt; create from existing file system for broker, common, client, junit-toolkit,
perftests, systests and each directory under management<br/>
4. Add the contents of lib/ to the build path<br/>
5. Setup Generated Code<br/>
6. Setup Dependencies</p>

<h3><a name="QpidJavaBuildHowTo-GeneratedCode"></a>Generated Code</h3>
<p>The Broker and Common packages both depend on generated code. After running 'ant'
the build/scratch directory will contain this generated code.<br/>
For the broker module add build/scratch/broker/src<br/>
For the common module add build/scratch/common/src</p>

<h3><a name="QpidJavaBuildHowTo-Dependencies"></a>Dependencies</h3>
<p>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:</p>

<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent
panelContent">
<pre>for i in `find . -name build.xml` ; do echo "$i:"; grep module.depends $i ; done
</pre>
</div></div>

<p>The <em>module.depend</em> value will detail which other modules are
dependencies. </p>

<p><b>broker</b></p>
<ul class="alternate" type="square">
	<li>common</li>
	<li>management/common</li>
</ul>


<p><b>client</b></p>
<ul class="alternate" type="square">
	<li>Common</li>
</ul>


<p><b>systest</b></p>
<ul class="alternate" type="square">
	<li>client</li>
	<li>management/common</li>
	<li>broker</li>
	<li>broker/test</li>
	<li>common</li>
	<li>junit-toolkit</li>
</ul>


<p><b>perftests</b></p>
<ul class="alternate" type="square">
	<li>systests</li>
	<li>client</li>
	<li>broker</li>
	<li>common</li>
	<li>junit-toolkit</li>
</ul>


<p><b>management/eclipse-plugin</b></p>
<ul class="alternate" type="square">
	<li>broker</li>
	<li>common</li>
	<li>management/common</li>
</ul>


<p><b>management/console</b></p>
<ul class="alternate" type="square">
	<li>common</li>
	<li>client</li>
</ul>


<p><b>management/agent</b></p>
<ul class="alternate" type="square">
	<li>common</li>
	<li>client</li>
</ul>


<p><b>management/tools/qpid-cli</b></p>
<ul class="alternate" type="square">
	<li>common</li>
	<li>management/common</li>
</ul>


<p><b>management/client</b></p>
<ul class="alternate" type="square">
	<li>common</li>
	<li>client</li>
</ul>


<p><b>integrationtests</b></p>
<ul class="alternate" type="square">
	<li>systests</li>
	<li>client</li>
	<li>common</li>
	<li>junit-toolkit</li>
</ul>


<p><b>testkit</b></p>
<ul class="alternate" type="square">
	<li>client</li>
	<li>broker</li>
	<li>common</li>
</ul>


<p><b>tools</b></p>
<ul class="alternate" type="square">
	<li>client</li>
	<li>common</li>
</ul>


<p><b>client/examples</b></p>
<ul class="alternate" type="square">
	<li>common</li>
	<li>client</li>
</ul>


<p><b>broker-plugins</b></p>
<ul class="alternate" type="square">
	<li>client</li>
	<li>management/common</li>
	<li>broker</li>
	<li>common</li>
	<li>junit-toolkit</li>
</ul>




<h2><a name="QpidJavaBuildHowTo-Whatnext%3F"></a>What next ?</h2>

<p>If you want to run your built Qpid package, see our <a href="/confluence/display/qpid/Getting+Started+Guide"
title="Getting Started Guide">Getting Started Guide</a> for details of how to do
that.</p>

<p>If you want to run our tests, you can use the ant test or testreport (produces a
useful report) targets.</p>
     </div>
     <div id="commentsSection" class="wiki-content pageSection">
       <div style="float: right;">
            <a href="http://cwiki.apache.org/confluence/users/viewnotifications.action"
class="grey">Change Notification Preferences</a>
       </div>

       <a href="http://cwiki.apache.org/confluence/display/qpid/Qpid+Java+Build+How+To">View
Online</a>
       |
       <a href="http://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=29231&revisedVersion=31&originalVersion=30">View
Change</a>
              |
       <a href="http://cwiki.apache.org/confluence/display/qpid/Qpid+Java+Build+How+To?showComments=true&amp;showCommentArea=true#addcomment">Add
Comment</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org


Mime
View raw message