JMeter Source Code in IntelliJ IDEA 2016
I’ve recently switched to using JetBrains’ IntelliJ IDEA and I wanted to get the JMeter source code working to contribute some bug fixes to the JMeter project.
Steps
These are the steps for IntelliJ IDEA 15 (but should work for 2016.x):
- Import project from Git:
https://github.com/apache/jmeter.git
- Select “Create project from existing sources”
- Name the project
- Select all source file directories
- Deselect any libraries, (we will add them later)
- Select all of the discovered modules
- Select the SDK (you’ll need to add one if you’ve not used IntelliJ before)
- Press Next and then Finish
- Click the “Ant Build” menu in IntelliJ
- Press add and add the
build.xml
file - Run the
download_jars
target - Open project settings (Ctrl+Alt+Shift+S) then add the downloaded jars to the project:
- The finished project should look something like this:
- You can compile and start the GUI by executing the
run_gui
ant target - If there are any errors in IntelliJ when viewing files (or pressing build project) you can usually solve them by pressing
alt
+enter
on the offending code and making the appropriate ‘module’ a dependency - however this shouldn’t stop you developing or running things via ant.
I’ve created a screencast of the above steps to import JMeter source into IntelliJ
if you prefer a visual format.