[英]Maven dependency in eclipse
我正在尝试使用Jersey API,这是我的第一个Maven项目。
我有两个看起来像这样的Maven依赖问题:
Description Resource Path Location Type
ArtifactTransferException: Failure to transfer org.glassfish.hk2:osgi-resource-locator:jar:1.0.1 from http://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.glassfish.hk2:osgi-resource-locator:jar:1.0.1 from/to central (http://repo.maven.apache.org/maven2)
Description Resource Path Location Type
Missing artifact org.glassfish.hk2:osgi-resource-locator:jar:1.0.1
我应该如何解决这个问题?
从中删除所有失败的下载
对于Windows:
cd %userprofile%\.m2\repository
for /r %i in (*.lastUpdated) do del %i
然后右键单击Eclipse中的项目,然后选择Maven-> Update Dependencies
可能的解决方案
settings.xml
文件,并在使用代理时设置代理
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.