【发布时间】:2019-12-18 19:24:34
【问题描述】:
目前我正在尝试在 Windows 中使用葡萄在 JMeter 中运行 groovy 脚本: 我的 JMeter 有 c:\JMeter\lib\groovy-all.2.4.16.jar、c:\JMeter\lib\ivy-2.5.0.jar(听说需要这个)。
我看到的许多葡萄配置示例都在 Linux 中。我将grapeConfig.xml 放在c:\JMeter\ 中,设置如下:
<ivysettings>
<settings defaultResolver="downloadGrapes"/>
<resolvers>
<chain name="downloadGrapes">
<filesystem name="cachedGrapes">
<ivy pattern="${user.home}/.groovy/grapes/[organisation]/[module]/ivy-[revision].xml"/>
<artifact pattern="${user.home}/.groovy/grapes/[organisation]/[module]/[type]s/[artifact]-[revision].[ext]"/>
</filesystem>
<!-- todo add 'endorsed groovy extensions' resolver here -->
<ibiblio name="codehaus" root="http://repository.codehaus.org/" m2compatible="true"/>
<ibiblio name="ibiblio" m2compatible="true"/>
<ibiblio name="java.net2" root="http://download.java.net/maven/2/" m2compatible="true"/>
<!-- this fixes the missing 2.1_3 version of cglib-nodep -->
<ibiblio name="mirror" root="http://mirrors.ibiblio.org/maven2/" m2compatible="true"/>
</chain>
</resolvers>
</ivysettings>
当我在 JMeter 中执行脚本时,我收到以下错误作为 groovy @Grab 的一部分:
General error during conversion: Error grabbing Grapes -- [download failed: commons-logging#commons-logging;1.1.1!commons-logging.jar]
java.lang.RuntimeException: Error grabbing Grapes -- [download failed: commons-logging#commons-logging;1.1.1!commons-logging.jar]
如果在 Windows 上使用 JMeter 和 groovy 正确配置葡萄,将不胜感激?
【问题讨论】:
标签: windows groovy jmeter groovy-grape