更新:這不會/不應再發生,請參閱接受的答案。如果您正在使用其他jar文件來解決這個問題,那通常是一件短暫的事情。您可以嘗試其他解決方法中提出的一些解決方法。我是Jersey 2.0 user guide。當我到了1.3(運行項目,我得到的失敗:遵循Jersey 2.0用戶指南時無法解析的依賴關係錯誤
[ERROR] Failed to execute goal on project xxx-service: Could not resolve dependencies for project xxx.restapi:xxx-service:jar:1.0-SNAPSHOT: Failure to find javax.annotation:javax.annotation-api:jar:1.2 in https://maven.java.net/content/repositories/snapshots/ was cached in the local repository, resolution will not be reattempted until the update interval of snapshot-repository.java.net has elapsed or updates are forced -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
這個問題似乎是沒有https://maven.java.net/content/groups/public/javax/annotation/javax.annotation-api/1.2/javax.annotation-api-1.2.jar
如果我們上去https://maven.java.net/content/groups/public/javax/annotation/javax.annotation-api/
我們可以看到,文件夾和JAR文件這些文件夾內部被重命名爲後綴-b01
等
pom本身沒有任何直接引用這個註釋jar所以我想問題是:我如何調整這種依賴關係? POM文件能夠正確解析依賴關係嗎?
由於某種原因,我必須在查看搜索結果之前打開該鏈接兩次,但它的工作原理:)謝謝。 – pulkitsinghal