3

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: http://maven.apache.org/guides/mini/guide-using-ant.html, 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:

  1. download jmeter source from svn repository
  2. build jmeter distribution
  3. 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.

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

Bakir Jusufbegovic
  • 2,806
  • 4
  • 32
  • 48

1 Answers1

2

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

See:

See for an example :

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 :

  • Unzip the official distribution
  • Copy your artifact in jmeter/lib/ext and dependencies in jmeter/lib
  • rezip it
UBIK LOAD PACK
  • 33,980
  • 5
  • 71
  • 116
  • Thanks for the suggestion, but my project in final needs to be a jmeter deliverable that will have my custom components included in that jmeter build. With the approach that you suggested, I could only include jmeter libs in my maven project – Bakir Jusufbegovic Sep 18 '12 at 21:23
  • No I don't think so, using pom you will generate your jar that will go in /lib/ext to be used as plugins. But maybe I didn't understand your requirement. – UBIK LOAD PACK Sep 18 '12 at 21:27
  • So requirement is: Have a maven project that, when installation is triggered, it will automatically pull latest jmeter from svn repository, build the jmeter, build my custom components with maven and copy those custom components to /lib/ext so that final JMeter deliverable has custom components integrated. – Bakir Jusufbegovic Sep 18 '12 at 21:30
  • If you mean you want to generate a zip that will contain jmeter+your components: If you're ok with using official version why not get it from official download site, unzip , add your components, rezip using either ANT from Maven with AntRunner. – UBIK LOAD PACK Sep 18 '12 at 21:35