Kin*_*xit 5 java jersey pom.xml maven
更新:这不会/不应该再发生,请参阅接受的答案.如果您遇到其他jar的问题,通常是暂时的.您可以尝试其他答案中建议的一些解决方法.
我按照Jersey 2.0用户指南的说明进行操作.当我达到1.3(运行项目时,我得到以下失败:
[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
Run Code Online (Sandbox Code Playgroud)
问题似乎是没有 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文件中放入什么才能正确解析依赖关系?
| 归档时间: |
|
| 查看次数: |
2139 次 |
| 最近记录: |