How to resolve Could not find artifact commons-math3:commons-math3:jar:3.4.1

大兔子大兔子 提交于 2019-12-11 06:19:20

问题


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

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

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.

I tried the below.

<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>

Which didn't work.

Will be glad to provide more info.


回答1:


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>


来源:https://stackoverflow.com/questions/42663577/how-to-resolve-could-not-find-artifact-commons-math3commons-math3jar3-4-1

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!