Although this answer is accepted, it only works for versions prior to 2.X. But for version above 2.X, see Answer.
Yup, you can add any libraries that you need by adding dependencies to the plugin, any explicitly defined dependencies will be copied to your jmeter / lib directory.
If the dependency is a JMeter plugin, you can specify this in your configuration, and then this dependency will be copied to your meter / lib / ext directory:
<plugin> <groupId>com.lazerycode.jmeter</groupId> <artifactId>jmeter-maven-plugin</artifactId> <version>1.9.0</version> <executions> <execution> <id>jmeter-tests</id> <phase>verify</phase> <goals> <goal>jmeter</goal> </goals> <configuration> <jmeterPlugins> <plugin> <groupId>kg.apc</groupId> <artifactId>jmeter-plugins</artifactId> </plugin> </jmeterPlugins> </configuration> </execution> </executions> <dependencies> <dependency> <groupId>kg.apc</groupId> <artifactId>jmeter-plugins</artifactId> <version>1.1.3</version> </dependency> </dependencies> </plugin>
This feature was broken before version 1.9.0.
Ardesco
source share