31941

Integrating JMeter as part of Maven project

Question:

I'm starting my work on the project related to creating some custom set of jmeter components that would be bundled in my custom jmeter distribution.

Those custom components are part of the Maven project and what I would like to do is try to integrate this maven project with latest jmeter project to be able to build and deliver jmeter build that contains my custom set of components with all related dependency jars.

Problem is that jmeter project is ant project. I've came across this: <a href="http://maven.apache.org/guides/mini/guide-using-ant.html" rel="nofollow">http://maven.apache.org/guides/mini/guide-using-ant.html</a>, maven-antrun-plugin which gives a possibility to embed ant task inside the maven pom.

Since I've never worked with ant (only worked with maven), my idea of using this plugin inside pom would be to define following targets:

<ol><li>download jmeter source from svn repository</li> <li>build jmeter distribution</li> <li>after building maven project (after install phase), copy jars (component and dependency jars) to the jmeter lib to form the final jmeter distribution with my custom components.</li> </ol>

My question is: Do you find this approach as the right one (are there some things to consider while doing this) and if not, can you suggest me some other ways of achieving the same goal?

Thanks in advance

Answer1:

Since JMeter 2.6, Apache JMeter artifacts are published on maven2 repositories.

See:

<ul><li><a href="http://mvnrepository.com/artifact/org.apache.jmeter/" rel="nofollow">http://mvnrepository.com/artifact/org.apache.jmeter/</a></li> </ul>

See for an example :

<ul><li><a href="https://github.com/Ronnie76er/jmeter-maven-plugin/wiki" rel="nofollow">https://github.com/Ronnie76er/jmeter-maven-plugin/wiki</a></li> </ul>

So what you can do is have your maven project that references these artifacts as dependencies.

And if you want to generate a full bundle containing JMETER+You Plugins then use AntRunner to :

<ul><li>Unzip the official distribution</li> <li>Copy your artifact in jmeter/lib/ext and dependencies in jmeter/lib</li> <li>rezip it</li> </ul>

Recommend

  • building a Maven project with Ant project as a child
  • Use Maven Replacer Plugin Before WAR is Packaged
  • Python Programming 3.4.2, Naughts and Crosses. Best way to check how to see if game is won?
  • Using “path” and “asset” for non-template data
  • Android - FM/Radio Transmitting
  • add service reference xamarin PCL
  • Maven - which projects or techologies you are using it for?
  • Google Scripts for Sheets - onEdit and “source”
  • access parent project OTHER_SWIFT_FLAGS from pod
  • Gnuplot multiplot: Convenient method for creating more complex layouts
  • Using bitbake is it possible to have a different do_install for a package based on the target image?
  • ionic plugin add phonegap-plugin-push results in a 404 Not Found Error
  • C++ how to get substring after get position of its index
  • Graceful pod termination
  • Counting Treaps
  • How do I check if System::Collections:ArrayList is empty / nullptr / null?
  • Glassfish - java.lang.NoClassDefFoundError
  • python: forcing relative imports to search from script file
  • File extension of zlib zipped html page?
  • iOS Cordova first plugin - plugin.xml to inject a feature
  • Jenkins Grails plugin does not list lastest versions of Grails
  • Iron Router: How do I send data to the layout?
  • How to generate and display a QR Code in ionic 2
  • Problem deserializing objects from cache on MyBatis 3/Java
  • Read a local file using javascript
  • ImageMagick, replace semi-transparent white with opaque white
  • If I include Java 8 in my Android app does that affect which devices it will work on?
  • Cannot connect to cassandra from Spark
  • Exchange data b/w iOS devices using Bluetooth 4.0
  • Cross-Platform Protobuf Serialization
  • Alternatives to the OPTIONAL fallback SPARQL pattern?
  • Python - Map / Reduce - How do I read JSON specific field in using DISCO count words example
  • Warning: Can't call setState (or forceUpdate) on an unmounted component
  • Confusion with PayPal's monthly billing cycle
  • bootstrap to use multiple ng-app
  • How to get icons for entities from eclipse?
  • Proper way to use connect-multiparty with express.js?
  • Load html files in TinyMce
  • Turn off referential integrity in Derby? is it possible?
  • JaxB to read class hierarchy