【发布时间】:2019-09-12 18:54:51
【问题描述】:
我将 jmeter-maven-plugin 2.9.0 与 maven 3.6.0 一起使用,当我运行 mvn verify 时出现以下错误:
未能执行目标 com.lazerycode.jmeter:jmeter-maven-plugin:2.9.0:configure (configure) on project performance-tests: Execution configure of goal com.lazerycode.jmeter:jmeter-maven-plugin:2.9 .0:配置失败:一个必需的类是错误的 在执行 com.lazerycode.jmeter:jmeter-maven-plugin:2.9.0:configure: net/minidev/asm/FieldFilter 时唱歌
我在同一个项目上创建了一个 java 类,并导入了 FieldFilter 类并且可以工作。
我尝试使用另一个版本的插件 2.8.5 进行验证,但我得到了同样的错误。
POM 内容:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>performance-tests</groupId>
<artifactId>performance-tests</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<hostName>${hostName}</hostName>
<nrUsers>${nrUsers}</nrUsers>
<rampUpPeriod>${rampUpPeriod}</rampUpPeriod>
<jmeter-maven-plugin.version>2.9.0</jmeter-maven-plugin.version>
<maven.compiler.source>1.6</maven.compiler.source>
<maven.compiler.target>1.6</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.11</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.jmeter/ApacheJMeter_core -->
<dependency>
<groupId>org.apache.jmeter</groupId>
<artifactId>ApacheJMeter_core</artifactId>
<version>5.1.1</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>com.lazerycode.jmeter</groupId>
<artifactId>jmeter-maven-plugin</artifactId>
<version>${jmeter-maven-plugin.version}</version>
<configuration>
<generateReports>true</generateReports>
<errorRateThresholdInPercent>1</errorRateThresholdInPercent>
<testResultsTimestamp>false</testResultsTimestamp>
<propertiesUser>
<hostName>${hostName}</hostName>
<rampUpPeriod>${rampUpPeriod}</rampUpPeriod>
<threads>${nrUsers}</threads>
</propertiesUser>
<jmeterExtensions>
<artifact>kg.apc:jmeter-plugins-casutg:2.8</artifact>
</jmeterExtensions>
<excludedArtifacts>
<exclusion>org.slf4j:slf4j-nop</exclusion>
<exclusion>avalon-framework:*</exclusion>
<exclusion>org.apache.tika:*</exclusion>
<exclusion>excalibur-datasource:excalibur-datasource</exclusion>
<exclusion>excalibur-instrument:excalibur-instrument</exclusion>
<exclusion>excalibur-logger:excalibur-logger</exclusion>
<exclusion>excalibur-pool:*</exclusion>
<exclusion>org.beanshell:bsh:jar:2.0b5</exclusion>
</excludedArtifacts>
<jMeterProcessJVMSettings>
<arguments>
<argument>-XX:MaxMetaspaceSize=256m</argument>
<argument>-Xmx1024m</argument>
<argument>-Xms1024m</argument>
</arguments>
</jMeterProcessJVMSettings>
</configuration>
<executions>
<execution>
<id>jmeter-tests</id>
<goals>
<goal>jmeter</goal>
</goals>
</execution>
<execution>
<id>jmeter-check-results</id>
<goals>
<goal>results</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>`
【问题讨论】:
标签: java jmeter jmeter-maven-plugin