工件名称与Maven存储库URL路径不匹配 [英] Artifact Name not matching the maven repo URL path

查看:98
本文介绍了工件名称与Maven存储库URL路径不匹配的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

下面URL下的工件名称不是错误的吗?

Isn’t the artifact name under below URL wrong?

http://repo1.maven .org/maven2/org/powermock/powermock-mockito-release-full/1.5.1/

按照上述URL,工件的名称应为powermock-mockito-release-full-1.5.1.jar,但我看到的是powermock-mockito-release-full-1.5.1 * -完整 *.jar.额外的 -full 破坏了我的Maven构建(无法找到资源).下面是我的依赖项声明,以及与下面的声明相比,我应该如何声明POM依赖项.

As per above URL, The name of the artifact should have been powermock-mockito-release-full-1.5.1.jar but what I see is powermock-mockito-release-full-1.5.1*-full*.jar. The additional –full is breaking my maven build (unable to find resource). Below is my dependency declaration and how different I should declare the POM dependency than below one.

<dependency>
    <groupId>org.powermock</groupId>
    <artifactId>powermock-mockito-release-full</artifactId>
    <version>1.5.1</version>
    <scope>test</scope>
</dependency>

我错过了什么吗?

谢谢

推荐答案

The last full in this repository is another dependency coordinate called classifier.

尝试添加分类器,您应该下载依赖项:

Try adding the classifier and you should download the dependency:

<dependency>
    <groupId>org.powermock</groupId>
    <artifactId>powermock-mockito-release-full</artifactId>
    <version>1.5.1</version>
    <classifier>full</classifier>
    <scope>test</scope>
</dependency>

我建议避免使用classifier,因为它们的值不是标准的,因此它们的含义和使用方法并不总是那么清楚.

I suggest to avoid classifier because their values are not standard and therefore their meaning and the way to use them is not always so clear.

这篇关于工件名称与Maven存储库URL路径不匹配的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆