Build Apache JMeter from source with Java 17+ and Gradle. Clone the repository, compile with ./gradlew build, and contribute patches to the project.
Building JMeter
Section titled โBuilding JMeterโBefore you can compile JMeter, you will need a few things:
- a Java 17 compatible JDK (Java Development Kit)
- Optional: Gradle installation
- the JMeter sources as shown in the next section
Acquiring the source
Section titled โAcquiring the sourceโThe official source releases of Apache JMeter can be downloaded from download page.
Compiling and packaging JMeter using Gradle
Section titled โCompiling and packaging JMeter using GradleโJMeter can be built entirely using Gradle. The basic command is:
./gradlew buildSee the list of available tasks via ./gradlew tasks (or ./gradlew tasks --all)
for the other tasks that can be used. More detailed information about the available tasks can be found
in gradle.md.
Opening project via IntelliJ IDEA
Section titled โOpening project via IntelliJ IDEAโYou require IntelliJ 2018.3.1 or newer.
- Open the build.gradle.kts file with IntelliJ IDEA and choose โOpen as Projectโ
- Make sure โCreate separate module per source setโ is selected
- Make sure โUse default gradle wrapperโ is selected
- In the โFile already existsโ dialogue, choose โYesโ to overwrite
- In the โOpen Projectโ dialogue, choose โDelete Existing Project and Importโ
Compiling and packaging JMeter using Eclipse
Section titled โCompiling and packaging JMeter using EclipseโOption 1 : Importing Eclipse project via Eclipseโs โimport Gradle projectโ wizard
Section titled โOption 1 : Importing Eclipse project via Eclipseโs โimport Gradle projectโ wizardโRecent Eclipse versions can import Gradle projects automatically, so use File โ Importโฆ Then choose Existing Gradle Project and proceed with the import.
Option 2 : Setting up Eclipse project with Gradle task
Section titled โOption 2 : Setting up Eclipse project with Gradle taskโOnce you have downloaded the sources, you can setup the Eclipse project by running:
./gradlew eclipseYou can then import the project using File โ Import โ Existing projects into Workspace and select the folder containing JMeter sources.
Contributing to JMeter
Section titled โContributing to JMeterโWe love contribution
Section titled โWe love contributionโ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 Issues page.
You can also contribute to translation, see JMeter Localisation (Translatorโs Guide).
Submitting a patch
Section titled โSubmitting a patchโIf you want to contribute to JMeter for a bug fix or enhancement, here is the procedure to follow:
Check your patch
Section titled โCheck your patchโBefore submitting your patch ensure you do the following:
Check that patch compiles and follows Tab space policy by running:
./gradlew checkCheck that patch does not break JUnit tests by running:
./gradlew testCreate a pull request using Git
Section titled โCreate a pull request using Gitโ- Fork Apache JMeter mirror
- Clone your forked repository locally:
git clone https://github.com/yourid/jmeter.git - Create a branch using for example issue id:
git branch gh123-thread-group-typo(please refrain from usingmasterandmainbranches for pull request) - Checkout the new branch:
git checkout gh123-thread-group-typo - Commit your fix there:
git commit -m 'Fix to BUGID' list of files - Please avoid creating merge commits in the PR. We embrace small changes, and merge commits are harder to review
- Push it:
git push origin gh123-thread-group-typo - Create a pull request
Proposing a change with a patch
Section titled โProposing a change with a patchโIf you cannot to create a pull request at GitHub, you might submit your changes as a unified diff patch on JMeter dev mailing list.
- Checkout Apache JMeter source
- Code your fix
- Create your patch by Right clicking on Eclipse project and select Team โ Create Patch โฆ
- Attach your patch to email message on JMeter dev list
Automated builds
Section titled โAutomated buildsโAutomated (nightly) builds
Section titled โAutomated (nightly) buildsโ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.
Please note that the builds have not undergone any QA and should only be used for development testing. For further information, see the Nightly builds for developers page.
Building Add-Ons
Section titled โBuilding Add-OnsโBuilding Add-Ons
Section titled โBuilding Add-Onsโ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.
See the extras/addons* files in the source tree for some suggestions