Maven - 无法解析工件 - cglib:cglib-nodep:jar:null
我正在尝试构建一个大型项目,但因以下错误而失败:
[INFO] ------------------------------------------------------------------------
[INFO] Building Utilities
[INFO] task-segment: [install]
[INFO] ------------------------------------------------------------------------
[INFO] [resources:resources]
[WARNING] Using platform encoding (Cp1255 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 16 resources
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to resolve artifact.
Couldn't find a version in [2.2.2] to match range [2.1_3,2.1_3]
cglib:cglib-nodep:jar:null
from the specified remote repositories:
java.net (http://download.java.net/maven/2),
internal (http://repo.some-project.org/maven),
central (http://repo1.maven.org/maven2)
Path to dependency:
1) org.some-project:util:jar:1.5.0
I 找到并下载cglib-nodep-2.1_3.jar
由于我缺乏使用 Maven 的经验,我不确定如何(hrr...)使构建过程使用此文件,而不是(我猜)从互联网获取它失败。
I'm trying to build a large project and failing with the following error:
[INFO] ------------------------------------------------------------------------
[INFO] Building Utilities
[INFO] task-segment: [install]
[INFO] ------------------------------------------------------------------------
[INFO] [resources:resources]
[WARNING] Using platform encoding (Cp1255 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 16 resources
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to resolve artifact.
Couldn't find a version in [2.2.2] to match range [2.1_3,2.1_3]
cglib:cglib-nodep:jar:null
from the specified remote repositories:
java.net (http://download.java.net/maven/2),
internal (http://repo.some-project.org/maven),
central (http://repo1.maven.org/maven2)
Path to dependency:
1) org.some-project:util:jar:1.5.0
I found and downloaded cglib-nodep-2.1_3.jar
As I lack experience with maven, I'm not sure how to (hrr...) make the build process use this file instead of failing on (I guess) fetching it from the internet.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
如果您将其放入
dependencyManagement
部分,而不是将其放入dependencies
部分,则它可以正常工作。所有版本都可以工作。当我将其放入
dependencies
部分而不是dependencyManagement
部分时,我遇到了同样的错误。你不需要这样做手动。
It is working if you put in the
dependencyManagement
section, instead of putting it in thedependencies
section.All the versions are working. I was getting the same error when I had put it in the
dependencies
section instead ofdependencyManagement
section. You need not do itmanually.
在 pom.xml 的
dependencyManagement
部分下添加:In your pom.xml under the
dependencyManagement
section add:cglib 版本 2.1_3 已从主 Maven 存储库中删除,取而代之的是 2.2.2
尝试将您的依赖项更新到 2.2.2 - 谁知道呢,也许它会起作用:)
如果没有,请下载 2.1_3(从 此处< /a> 例如)和 手动在本地安装。
cglib version 2.1_3 has been removed from the main maven repo in favor of 2.2.2
Try updating your dependency to 2.2.2 - who knows, perhaps it'll work :)
If it doesn't, download 2.1_3 (from here for example) and manually install it locally.