gpt4 book ai didi

java - Eclipse 中的 Maven 依赖

转载 作者:行者123 更新时间:2023-11-30 08:12:14 24 4
gpt4 key购买 nike

我正在尝试使用 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

我应该如何解决这个问题?

最佳答案

删除所有失败的下载

对于 Windows:

cd %userprofile%\.m2\repository
for /r %i in (*.lastUpdated) do del %i

然后在 Eclipse 中右键单击您的项目并选择 Maven->Update Dependencies

关于java - Eclipse 中的 Maven 依赖,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30210635/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com