更新时间:2023-12-05 14:31:04
我找到了答案:
jmeter/lib
目录The solution for the first is the following from jmeter-maven-plugin doc:
<project>
[...]
<build>
<plugins>
<plugin>
<groupId>com.lazerycode.jmeter</groupId>
<artifactId>jmeter-maven-plugin</artifactId>
<version>USE LAST VERSION</version>
<executions>
<execution>
<id>jmeter-tests</id>
<goals>
<goal>jmeter</goal>
</goals>
</execution>
</executions>
<configuration>
<testPlanLibraries>
<artifact>org.apache.activemq:activemq-spring:5.15.2</artifact>
<artifact>org.apache.activemq:activemq-client:5.15.2</artifact>
<artifact>org.apache.activemq:activemq-broker:5.15.2</artifact>
</testPlanLibraries>
<excludedArtifacts>
<exclusion>com.sun.jdmk:jmxtools</exclusion>
<exclusion>com.sun.jmx:jmxri</exclusion>
</excludedArtifacts>
</configuration>
</plugin>
</plugins>
</build>
[...]
</project>
第二个解决方案是,我需要复制jmx文件旁边的Sampler脚本. Maven可以使用 maven-resource-plugin 轻松地做到这一点.
The solution for the second is that I need to copy Sampler scripts next to jmx file. Maven can do this easily using maven-resource-plugin.