我正在尝试使用jersey API,这是我的第一个maven项目。
我有2个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
我该怎么办呢?
答案 0 :(得分:1)
从
中删除所有失败的下载内容对于Windows:
cd %userprofile%\.m2\repository
for /r %i in (*.lastUpdated) do del %i
然后在eclipse中右键单击您的项目并选择Maven-> Update Dependencies
答案 1 :(得分:0)
可能的解决方案
settings.xml
文件并设置代理(如果您正在使用它们)