How do I build Jmeter.jar

2019-08-30 03:32发布

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?

2条回答
聊天终结者
2楼-- · 2019-08-30 03:42

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

查看更多
祖国的老花朵
3楼-- · 2019-08-30 03:54

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.

查看更多
登录 后发表回答