本文介绍了如何解决无法找到工件commons-math3:commons-math3:jar:3.4.1的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个通过maven执行JMeter测试套件的项目.

I have a project that executes a JMeter tests suite though maven.

我使用com.lazerycode.jmeter的jmeter-maven-plugin.

I use com.lazerycode.jmeter s jmeter-maven-plugin.

在2.0.3版中,我的项目运行良好.但是,当我将插件版本更新为2.1.0时,会引发以下错误.

With version 2.0.3 my project runs well. but when I update teh plugins version to 2.1.0 the following error is thrown.

[ERROR] Failed to execute goal com.lazerycode.jmeter:jmeter-maven-plugin:2.1.0:configure (configure) on project my-regression: Could not find artifact commons-math3:commons-math3:jar:3.4.1 in central (https://repo.maven.apache.org/maven2) -> [Help 1]

通过阅读类似,可以通过排除依赖项来解决.

I know by going through articles like this, that this can be resolved by excluding the dependencies.

但是它只是我不知道如何配置该依赖项.

but its just I don't know how to configure that dependency.

我尝试了以下方法.

<dependencies> 
    <dependency> 
        <groupId>org.apache.commons</groupId> 
        <artifactId>commons-math3</artifactId> 
        <version>3.4.1</version> 
    </dependency> 
    <dependency> 
        <groupId>commons-math3</groupId> 
        <artifactId>commons-math3</artifactId> 
        <version>3.4.1</version> 
        <exclusions> 
            <exclusion> 
                <groupId>commons-math3</groupId> 
                <artifactId>commons-math3</artifactId> 
            </exclusion> 
        </exclusions> 
    </dependency> 
</dependencies>

哪个没用.

很乐意提供更多信息.

推荐答案

使用插件并在配置节点下添加:

Use version 2.6.0 of the plugin and add under configuration node:

 <excludedArtifacts>
      <exclusion>commons-pool2:commons-pool2</exclusion>
      <exclusion>commons-math3:commons-math3</exclusion>
 </excludedArtifacts>

这篇关于如何解决无法找到工件commons-math3:commons-math3:jar:3.4.1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-10 05:49