<?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.
-->
<document>
  <properties>
    <title>Building JMeter and Add-Ons</title>
  </properties>
<body>
<section name="Building JMeter and Add-Ons">
<note>
<b>Note to developers:</b>
This is a very brief overview. 
There is more information on the <a href="http://wiki.apache.org/jmeter">JMeter Wiki</a> or in <code>eclipse.readme</code> in root folder of sources.
</note>
<h2>Building Add-Ons</h2>
<p>
There is no need to build JMeter if you just want to build an add-on.
Just download the binary archive and add the jars to the classpath or use Maven artifacts to build your add-ons.
You may want to also download the source so it can be used by the IDE.
</p>
<p>See the <code>extras/addons*</code> files in the source tree for some suggestions</p>

<h2>Building JMeter</h2>
<h3>Acquiring the source</h3>
<p>The full source is distributed alongside the binary, it can also be downloaded from SVN or found on <a target="_blank" href="https://github.com/apache/jmeter">Apache JMeter Github Mirror</a> .</p>
<p>
The source archive and SVN do not contain any of the required library files. 
These need to be downloaded by running the Ant command:</p>
<source>
ant download_jars
</source>
<p>Or you can download the binary distribution archive for a release and unpack it into the same directory structure as the source.
This will ensure that the <code>lib/</code> directory contains the jar files needed for running JMeter.
There are a few additional jars that are needed to build JMeter, download these using:
</p>
<source>
ant download_jars
</source>
<p>
This will retrieve any missing jars.
</p>
<h3>Compiling and packaging JMeter using Ant</h3>
<p>
JMeter can be built entirely using Ant.
The basic command is:</p>
<source>
ant [install]
</source>
See build.xml (or call <code>ant -p</code>) for the other targets that can be used.
<h3>Compiling and packaging JMeter using Eclipse</h3>
<p>
Once you have downloaded the source from SVN or the release archives and run the ant <code>download_jars</code> target to
install the dependent jars, you can configure Eclipse. The easiest way to do this is to replace the Eclipse <code>.classpath</code>
file with the <code>eclipse.classpath</code> file provided with JMeter. This will set up the source-paths and most of the libraries.
</p>
<p>
Ensure you read <code>eclipse.readme</code> for project configuration.
</p>
</section>
</body>
</document>
