Integrating JMeter as part of Maven project

瘦欲@ 提交于 2019-12-12 13:37:24

问题


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


回答1:


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

See:

  • http://mvnrepository.com/artifact/org.apache.jmeter/

See for an example :

  • https://github.com/Ronnie76er/jmeter-maven-plugin/wiki

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


来源:https://stackoverflow.com/questions/12459394/integrating-jmeter-as-part-of-maven-project

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!