JMeter Plug-In development: setting up Maven project

A typical setup, with only one additional dependency:

<dependency>
  <groupId>org.apache.jmeter</groupId>
  <artifactId>ApacheJMeter_core</artifactId>
  <version>${version.jmeter}</version>
  <exclusions>
    <exclusion>
      <groupId>com.sun</groupId>
      <artifactId>tools</artifactId>
    </exclusion>
    <exclusion>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
    </exclusion>
  </exclusions>
</dependency>

where ${version.jmeter} is a JMeter version, e.g. 2.8:

<properties>
     <version.jmeter>2.8</version.jmeter>
</properties>

Unfortunately JMeter brings a lot of transitive dependencies, which can collide with project’s own dependencies. Most obvious are com.sun:tools, which is really part of JDK, and junit.

This is the only special entity in the pom.xml for JMeter plug-in project.

JMeter Plug-In development: setting up Maven project