blob: adbd7123ee66d75e859f7da77f49cbd7caf55de4 [file] [log] [blame]
<!DOCTYPE html SYSTEM "about:legacy-compat">
<html lang="en">
<head>
<META http-equiv="Content-Type" content="text/html; charset=iso-8859-15">
<title>Apache JMeter
-
Building and Contributing to JMeter</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://fonts.googleapis.com/css?family=Merriweather:400normal" rel="stylesheet" type="text/css">
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.1/css/font-awesome.min.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" type="text/css" href="./css/new-style.css">
<link rel="apple-touch-icon-precomposed" href="./images/apple-touch-icon.png">
<link rel="icon" href="./images/favicon.png">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="./images/mstile-144x144.png">
<meta name="theme-color" content="#ffffff">
</head>
<body role="document">
<a href="#content" class="hidden">Main content</a>
<div class="header">
<!--
APACHE LOGO
-->
<div>
<a href="https://www.apache.org"><img title="Apache Software Foundation" class="asf-logo logo" src="./images/asf-logo.svg" alt="Logo ASF"></a>
</div>
<!--
PROJECT LOGO
-->
<div>
<a href="https://jmeter.apache.org/"><img class="logo" src="./images/logo.svg" alt="Apache JMeter"></a>
</div>
<div class="banner">
<a href="https://www.apache.org/events/current-event.html"><img src="https://www.apache.org/events/current-event-234x60.png" alt="Current Apache event teaser"></a>
<div class="clear"></div>
</div>
</div>
<div class="nav">
<ul class="menu">
<li onClick="return true">
<div class="menu-title">About</div>
<ul>
<li>
<a href="./index.html">Overview</a>
</li>
<li>
<a href="https://www.apache.org/licenses/">License</a>
</li>
</ul>
</li>
</ul>
<ul class="menu">
<li onClick="return true">
<div class="menu-title">Download</div>
<ul>
<li>
<a href="./download_jmeter.cgi">Download Releases</a>
</li>
<li>
<a href="./changes.html">Release Notes</a>
</li>
</ul>
</li>
</ul>
<ul class="menu">
<li onClick="return true">
<div class="menu-title">Documentation</div>
<ul>
<li>
<a href="./usermanual/get-started.html">Get Started</a>
</li>
<li>
<a href="./usermanual/index.html">User Manual</a>
</li>
<li>
<a href="./usermanual/best-practices.html">Best Practices</a>
</li>
<li>
<a href="./usermanual/component_reference.html">Component Reference</a>
</li>
<li>
<a href="./usermanual/functions.html">Functions Reference</a>
</li>
<li>
<a href="./usermanual/properties_reference.html">Properties Reference</a>
</li>
<li>
<a href="./changes_history.html">Change History</a>
</li>
<li>
<a href="./api/index.html">Javadocs</a>
</li>
<li>
<a href="https://cwiki.apache.org/confluence/display/JMETER/Home">JMeter Wiki</a>
</li>
<li>
<a href="https://cwiki.apache.org/confluence/display/JMETER/JMeterFAQ">FAQ (Wiki)</a>
</li>
</ul>
</li>
</ul>
<ul class="menu">
<li onClick="return true">
<div class="menu-title">Tutorials</div>
<ul>
<li>
<a href="./usermanual/jmeter_distributed_testing_step_by_step.html">Distributed Testing</a>
</li>
<li>
<a href="./usermanual/jmeter_proxy_step_by_step.html">Recording Tests</a>
</li>
<li>
<a href="./usermanual/junitsampler_tutorial.html">JUnit Sampler</a>
</li>
<li>
<a href="./usermanual/jmeter_accesslog_sampler_step_by_step.html">Access Log Sampler</a>
</li>
<li>
<a href="./usermanual/jmeter_tutorial.html">Extending JMeter</a>
</li>
</ul>
</li>
</ul>
<ul class="menu">
<li onClick="return true">
<div class="menu-title">Community</div>
<ul>
<li>
<a href="./issues.html">Issue Tracking</a>
</li>
<li>
<a href="https://www.apache.org/security/">Security</a>
</li>
<li>
<a href="./mail.html">Mailing Lists</a>
</li>
<li>
<a href="./svnindex.html">Source Repositories</a>
</li>
<li>
<a href="./building.html">Building and Contributing</a>
</li>
<li>
<a href="https://projects.apache.org/project.html?jmeter">Project info at Apache</a>
</li>
<li>
<a href="https://cwiki.apache.org/confluence/display/JMETER/JMeterCommitters">Contributors</a>
</li>
</ul>
</li>
</ul>
<ul class="menu">
<li onClick="return true">
<div class="menu-title">Foundation</div>
<ul>
<li>
<a href="https://www.apache.org/">The Apache Software Foundation (ASF)</a>
</li>
<li>
<a href="https://www.apache.org/foundation/getinvolved.html">Get Involved in the ASF</a>
</li>
<li>
<a href="https://www.apache.org/foundation/sponsorship.html">Sponsorship</a>
</li>
<li>
<a href="https://www.apache.org/foundation/thanks.html">Thanks</a>
</li>
</ul>
</li>
</ul>
</div>
<div class="main" id="content">
<div class="social-media">
<ul class="social-media-links">
<li class="twitter">
<a href="https://twitter.com/ApacheJMeter" title="Follow us on Twitter"><i class="fa fa-twitter" aria-hidden="true"></i>Twitter</a>
</li>
<li class="github">
<a href="https://github.com/apache/jmeter" title="Fork us on github"><i class="fa fa-github" aria-hidden="true"></i>github</a>
</li>
</ul>
</div>
<div class="section">
<h1>Building JMeter</h1>
Before you can compile JMeter, you will need a few things:
<ul>
<li>a Java 8 compatible JDK (Java Development Kit)</li>
<li>Optional: <a href="https://gradle.org/">Gradle</a> installation</li>
<li>the JMeter sources as shown in the next section</li>
</ul>
<h3>Acquiring the source</h3>
<p>The official source releases of Apache JMeter can be downloaded from <a href="download_jmeter.cgi">download page</a>.</p>
<h3>Compiling and packaging JMeter using Gradle</h3>
<p>
JMeter can be built entirely using Gradle.
The basic command is:</p>
<pre class="source">
./gradlew build
</pre>
<p>
See the list of available tasks via <span class="code">./gradlew tasks</span> (or <span class="code">./gradlew tasks --all</span>)
for the other tasks that can be used. More detailed information about the available tasks can be found
in <a href="https://github.com/apache/jmeter/blob/master/gradle.md">gradle.md</a>.
</p>
<h3>Opening project via IntelliJ IDEA</h3>
<p>You require IntelliJ 2018.3.1 or newer.</p>
<ul>
<li>Open the build.gradle.kts file with IntelliJ IDEA and choose "Open as Project"</li>
<li>Make sure "Create separate module per source set" is selected</li>
<li>Make sure "Use default gradle wrapper" is selected</li>
<li>In the "File already exists" dialogue, choose "Yes" to overwrite</li>
<li>In the "Open Project" dialogue, choose "Delete Existing Project and Import"</li>
</ul>
<h3>Compiling and packaging JMeter using Eclipse</h3>
<h4>Option 1 : Importing Eclipse project via Eclipse's "import Gradle project" wizard</h4>
Recent Eclipse versions can import Gradle projects automatically, so use
<span class="menuchoice"><span class="guimenuitem">File</span>&nbsp;&rarr;&nbsp;<span class="guimenuitem">Import...</span></span>
Then choose <span class="menuchoice"><span class="guimenuitem">Existing Gradle Project</span></span> and proceed
with the import.
<h4>Option 2 : Setting up Eclipse project with Gradle task</h4>
Once you have downloaded the sources, you can setup the Eclipse project by running:
<pre class="source">./gradlew eclipse</pre>
You can then import the project using
<span class="menuchoice"><span class="guimenuitem">File</span>&nbsp;&rarr;&nbsp;<span class="guimenuitem">Import</span>&nbsp;&rarr;&nbsp;<span class="guimenuitem">Existing projects into Workspace</span></span> and select the folder containing JMeter sources.
</div>
<div class="section">
<h1>Contributing to JMeter</h1>
<h2>We love contribution</h2>
<p>
We are very grateful to you if you take some time to contribute to the project.
If you have some time to spend on the project you can pick existing enhancement or bug from <a target="_blank" href="issues.html">Issues page</a>.<br>
You can also contribute to translation, see <a href="localising/index.html">JMeter Localisation (Translator's Guide)</a>.
</p>
<h2>Submitting a patch</h2>
<p>
If you want to contribute to JMeter for a bug fix or enhancement, here is the procedure to follow:
</p>
<h3>Check your patch</h3>
<p>
Before submitting your patch ensure you do the following:<br>
Check that patch compiles and follows Tab space policy by running:
</p>
<pre class="source">./gradlew check</pre>
<p>
Check that patch does not break JUnit tests by running:
</p>
<pre class="source">./gradlew test</pre>
<h3>Create a PR using GIT</h3>
<ul>
<li>Open a bugzilla issue, see <a target="_blank" href="issues.html">Issues page</a>
</li>
<li>Fork <a href="https://www.github.com/apache/jmeter">Apache JMeter mirror</a>
</li>
<li>Clone your forked repository locally : <pre class="source">git clone https://github.com/yourid/jmeter/</pre>
</li>
<li>Create a branch using for example bugzilla id: <pre class="source">git branch BUGID</pre>
</li>
<li>Checkout the new branch : <pre class="source">git checkout BUGID</pre>
</li>
<li>commit your fix there : <pre class="source">git commit -m 'Fix to BUGID' list of files</pre>
</li>
<li>Please avoid creating merge commits in the PR. We embrace small changes, and merge commits are harder to review</li>
<li>Add JMeter repository as upstream : <pre class="source">git remote add upstream http://www.github.com/apache/jmeter</pre>
</li>
<li>push it : <pre class="source">git push origin BUGID</pre>
</li>
<li>Create a PR and link it in the bugzilla issue</li>
</ul>
<div class="clear"></div>
<div class="note">Different operation systems have different defaults for end-of-line markers.
Typical configuration is CRLF for Windows and LF for macOS and GNU/Linux.<br>
It is recommended to follow that configuration by appropriate settings of <span class="code">core.autocrlf</span>.
For Windows <pre class="source">git config --global core.autocrlf true</pre>, and for macOS and GNU/Linux set <pre class="source">git config --global core.autocrlf input</pre>
Git will automatically recognize text files in the repository thanks to <span class="code">.gitattributes</span>,
and Git will convert line endings for text files to the appropriate platform-native format (according to <span class="code">core.autocrlf</span>)<br>
Certain files (e.g. <span class="code">*.sh</span> or <span class="code">*.bat</span>) have predefined end of line policy
no matter the configuration of the developer workstation.
</div>
<div class="clear"></div>
<h3>Create a PR using Patch</h3>
<ul>
<li>Open a bugzilla issue, see <a target="_blank" href="issues.html">Issues page</a>
</li>
<li>Checkout Apache JMeter source</li>
<li>Code your fix</li>
<li>Create your patch by Right clicking on Eclipse project and select
<span class="menuchoice"><span class="guimenuitem">Team</span>&nbsp;&rarr;&nbsp;<span class="guimenuitem">Create Patch &hellip;</span></span>
</li>
<li>Attach your patch to the bugzilla issue</li>
</ul>
</div>
<div class="section">
<h1>Automated builds</h1>
<h2>Automated (nightly) builds</h2>
<p>
As part of the development process, the JMeter project has access to various Continuous Integration (CI) server builds.
The build output can be useful for testing recent changes to the code-base.
</p>
<p>
Please note that the builds have not undergone any QA and should only be used for development testing.
For further information, see the <a href="nightly.html">Nightly builds for developers</a> page.
</p>
</div>
<div class="section">
<h1>Building Add-Ons</h1>
<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 <span class="code">extras/addons*</span> files in the source tree for some suggestions</p>
</div>
<div class="share-links">
Share this page:
<ul>
<li class="fb">
<a data-social-url="https://facebook.com/sharer/sharer.php?u=" title="Share on facebook"><i class="fa fa-facebook" aria-hidden="true"></i>share</a>
</li>
<li class="twitter">
<a data-social-url="https://twitter.com/intent/tweet?url=" title="Tweet on twitter"><i class="fa fa-twitter" aria-hidden="true"></i>tweet</a>
</li>
</ul>
</div>
<a href="#top" id="topButton">Go to top</a>
</div>
<div class="footer">
<div class="copyright">
Copyright &copy;
1999 &ndash;
2020
, Apache Software Foundation
</div>
<div class="trademarks">Apache, Apache JMeter, JMeter, the Apache
feather, and the Apache JMeter logo are
trademarks of the
Apache Software Foundation.
</div>
</div>
<script>(function(){
"use strict";
// enable 'go to top' button functionality
document.addEventListener('scroll', function() {
if (document.body.scrollTop > 500 || document.documentElement.scrollTop > 500) {
document.getElementById("topButton").style.display = "block";
} else {
document.getElementById("topButton").style.display = "none";
}
});
// fill in the current location into social links on this page.
var as = document.getElementsByTagName('a');
var loc = document.location.href;
if (!loc.toLowerCase().startsWith('http')) {
return;
}
for (var i=0; i<as.length; i++) {
var href = as[i].getAttribute('data-social-url');
if (href !== null) {
as[i].href = href + encodeURIComponent(loc);
}
}
})();</script>
</body>
</html>