我相信其他人尝试过这种用法,但我在网上找不到好的例子。我希望有人能帮助和评论这是否可行。
我的pom.xml文件的一部分如下所示。问题是,Maven无法找到声明为“maven plugin”依赖项的“j抄-ssh-取样器”。我应该配置Maven来搜索不同的存储库吗?
谢谢玉林
错误未能在项目j抄测试上执行目标com.lazerycode.jmeter:jmeter-maven-plugin:1.10.0:jmeter ( be Test):对目标com.lazerycode.jmeter:jmeter-maven-plugin:1.10.0:jmeter的测试失败: Plugin com.lazerycode.jmeter:jmeter-maven-plugin:1.10.0或其依赖项无法解决:未能在https://repo.maven.apache.org/maven2中找到org.apache.jmeter.protocol.ssh.sampler:jmeter-ssh-sampler:jar:0.1.0被缓存在本地存储库中,在中央更新间隔已过或更新被迫->帮助1之前,将不会重新尝试解析。
<build>
<plugins>
<plugin>
<groupId>com.lazerycode.jmeter</groupId>
<artifactId>jmeter-maven-plugin</artifactId>
<version>1.10.0</version>
<executions>
<execution>
<id>jmeter-tests</id>
<phase>verify</phase>
<goals>
<goal>jmeter</goal>
</goals>
<configuration>
<suppressJMeterOutput>false</suppressJMeterOutput>
<propertiesUser>
<host>${target_server}</host>
</propertiesUser>
<jmeterPlugins>
<plugin>
<groupId>org.apache.jmeter.protocol.ssh.sampler</groupId>
<artifactId>jmeter-ssh-sampler</artifactId>
</plugin>
</jmeterPlugins>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>com.jcraft</groupId>
<artifactId>jsch</artifactId>
<version>0.1.51</version>
</dependency>
<dependency>
<groupId>org.apache.jmeter.protocol.ssh.sampler</groupId>
<artifactId>jmeter-ssh-sampler</artifactId>
<version>0.1.0</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>发布于 2015-08-04 20:04:27
在maven central中没有j计量-ssh-取样器:
http://search.maven.org/#search|ga|1|org.apache.jmeter.protocol.ssh.sampler
如果无法找到此依赖项,我认为j抄-maven-plugin将无法使用j抄-ssh-取样器。它要么需要在maven正在寻找的存储库中提供,要么您可能会被恶意攻击,我建议尽可能避免这些漏洞(例如,直接操作文件系统)。
发布于 2015-10-12 19:12:55
JMeter SSH采样器不在任何Maven存储库中。添加它、克隆git、编译代码以及将jar上传(部署)到您的中央Maven存储库是最简单的方法。
https://stackoverflow.com/questions/31799652
复制相似问题