How do I build Jmeter.jar

别等时光非礼了梦想. 提交于 2020-01-06 07:03:16

问题


I have trouble using SSL pages with JMeter, which I previously posted here.

I heard from the JMeter official group that problem might lie in jmeter.jar, which is used by the JMeter Maven plug-in, as its version is 2.2 whilst the current version of JMeter is 2.4.

I had a look at my JMeter directory and saw ApacheJMeter.jar, but I don't think it is the same as jmeter.jar, since ApacheJMeter.jar seems to have much fewer classes than jmeter.jar.

Where could I get the jmeter.jar file from, or how could I build it myself?


回答1:


It's fixed in the latest version which is now available from the central maven repository so you no longer need to specify a repository in your POM to use it, all that is required now is:

<plugin>
    <groupId>com.lazerycode.jmeter</groupId>
    <artifactId>jmeter-maven-plugin</artifactId>
    <version>1.4</version>
    <executions>
        <execution>
            <id>jmeter-tests</id>
            <phase>verify</phase>
            <goals>
                <goal>jmeter</goal>
            </goals>
        </execution>
    </executions>
</plugin>

It will pull down the latest JMeter 2.6 artifacts that have been released by Apache and are in the maven central repo as well (So you no longer need to worry about finding JMeter artifacts and/or building them yourself).

Note that the GroupID and ArtifactID have changed.

Project website is http://jmeter.lazerycode.com




回答2:


Not sure there is a clean solution to your problem.

The latest JMeter version is 2.4 while the JMeter Maven plugin uses a custom jar called jmeter-2.2.jar. This is a user contributed plugin and the contributor has created this custom jar for use with the Maven plugin.

Having seen the jar and compared the contents, it looks to be a combination of the contents present in these 2 jars from Apache - JMETER_HOME/lib/ext/ApacheJMeter_components.jar and JMETER_HOME/lib/ext/ApacheJMeter_core.jar.

What you could try is to mvn:deploy both these jars from JMeter 2.4 into your local repository similar to the jmeter-2.2.jar as done here

If that doesnt work, then make your own jmeter-2.4.jar by extracting these 2 completely and creating one single jar out of them.

This still does not ensure the version of JMeterMavenPlugin will work with this new code from 2.4

Alternately, try contacting one of the plugin authors to see if they have any advice.



来源:https://stackoverflow.com/questions/3691854/how-do-i-build-jmeter-jar

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