转自 https://blog.csdn.net/FU250/article/details/84400426

问题描述,本地仓库有该jar包,但是中央仓库没有该包,mvn编译时一直报如右错误:Failure to find com.sun:jai_codec:jar:1.1.3 in https://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 -> [Help 1]。

解决方案,从本地找到该包位置,本地路径一般为:C:\Users\user\.m2\repository\com\sun\jai_codec\1.1.3  找个文件

_remote.repositories 打开文件看到内容如下:

#NOTE: This is an Aether internal implementation file, its format can be changed without prior notice.
#Thu Nov 22 19:38:11 CST 2018
jai_codec-1.1.3.jar>nexus=
将nexus修改为central:如下

#NOTE: This is an Aether internal implementation file, its format can be changed without prior notice.
#Thu Nov 22 19:38:11 CST 2018
jai_codec-1.1.3.jar>central=
问题分析,以上包从第三方仓库下载来的,因为中央仓库没有该jar包,可以访问中央仓库地址https://repo.maven.apache.org/maven2 查找,从第三方仓库下载来的包在以上文件标记来源为nexus了。

个人猜测,maven的某种机制,确认你的包是从maven仓库下载下来的才会去本地仓库去找,从其他地方下载的jar包我都不承认其合法性,所以就一直不给通过。以上解决方法其实就是手动修改告诉maven我的jar是合法公民,不用在去中央仓库去找,于是去本地仓库找该jar,如果找不到就再去中央仓库去找。

有更好的答案可以即使分享

以下为错误完整信息:

[ERROR] Failed to execute goal on project xxxx: Could not resolve dependencies for project xxxx: Failure to find com.sun:jai_codec:jar:1.1.3 in https://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 -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal on project xxxx: Could not resolve dependencies for project xxxx: Failure to find com.sun:jai_codec:jar:1.1.3 in https://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
        at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies(LifecycleDependencyResolver.java:220)
        at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.resolveProjectDependencies(LifecycleDependencyResolver.java:127)
        at org.apache.maven.lifecycle.internal.MojoExecutor.ensureDependenciesAreResolved(MojoExecutor.java:257)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:200)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
        at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:355)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:216)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:160)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.project.DependencyResolutionException: Could not resolve dependencies for project xxxx: Failure to find com.sun:jai_codec:jar:1.1.3 in https://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
        at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(DefaultProjectDependenciesResolver.java:211)
        at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies(LifecycleDependencyResolver.java:195)
        ... 22 more
Caused by: org.eclipse.aether.resolution.DependencyResolutionException: Failure to find com.sun:jai_codec:jar:1.1.3 in https://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
        at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:384)
        at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(DefaultProjectDependenciesResolver.java:205)
        ... 23 more
Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: Failure to find com.sun:jai_codec:jar:1.1.3 in https://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
        at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:444)
        at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:246)
        at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:367)
        ... 24 more
Caused by: org.eclipse.aether.transfer.ArtifactNotFoundException: Failure to find com.sun:jai_codec:jar:1.1.3 in https://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
        at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.newException(DefaultUpdateCheckManager.java:231)
        at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.checkArtifact(DefaultUpdateCheckManager.java:206)
        at org.eclipse.aether.internal.impl.DefaultArtifactResolver.gatherDownloads(DefaultArtifactResolver.java:585)
        at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:503)
        at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:421)
        ... 26 more
[ERROR]
[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
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command

————————————————
版权声明:本文为CSDN博主「_再见阿郎_」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/FU250/article/details/84400426

【转】maven Failure to find xxx in 中央仓库相关推荐

  1. maven安装异常 Failure to find xxx in 中央仓库

    当maven环境重新编译安装的时候,程序引用了第三方或内部人员编写的jar包依赖,可能会出现 Failure to find xxx in 中央仓库 错误,下面将通过 maven 命令本地安装jar包 ...

  2. Failure to find xxx in 中央仓库

    问题描述,本地仓库有该jar包,但是中央仓库没有该包,mvn编译时一直报如右错误:Failure to find com.sun:jai_codec:jar:1.1.3 in https://repo ...

  3. Maven使用技巧001--- 离线更新nexus中央仓库索引的方案

    nexus可以在线更新中央仓库索引,但是更新速度慢,而且很有可能下载的索引不全.下面介绍一种离线更新中央仓库索引的方式,速度快并且可靠. 1.访问http://repo.maven.apache.or ...

  4. mac maven安装位置_Maven的安装以及仓库的作用

    maven安装 下载安装 从官网站下载maven3.3.9 版本 解压,将maven解压到一个不含有中文和空格的目录中. bin目录 mvn.bat (以run方式运行项目). mvnDebug.ba ...

  5. Failure to find xxx in http://maven.aliyun.com/nexus/content/groups/public

    [maven报错] 报错问题 Failure to find io.iec.edp:caf-boot-parent:pom:0.3.4 in http://maven.aliyun.com/nexus ...

  6. maven错误:unknow文件夹--报错:Failure to find xxx:pom:unknown

    maven错误:unknow文件夹--报错:Failure to find xxx:pom:unknown 我的问题原因 我的解决 具体过程 解决 我的问题原因 根本原因:这个依赖的版本号没有指定 我 ...

  7. Gradle 配置阿里云代理 https,maven central 中央仓库,google,gradle plugin,jcenter

    Gradle 配置阿里云代理 1. 问题描述 在使用Gradle更新项目依赖时,发生如下错误: Using insecure protocols with repositories, without ...

  8. 如何把JAR发布到maven中央仓库

    详细描述maven中央仓库发布jar包的中间过程, 以及遇到的一些问题汇总, 尽量用文字描述清楚, 耐心看下去, 就一定会发布成功 ----Sonatype篇---- 名词解释: Sonatype N ...

  9. Maven中央仓库连接不上的问题解决

    问题背景 Maven导入时不断出现类似Failure to transfer org.apache.maven.plugins:maven-surefire-plugin:pom:2.12.4 fro ...

最新文章

  1. Netty对Protocol Buffer多协议的支持(八)
  2. 中国联通被指乱扣费 返还金额限制用
  3. java dib文件 加位图文件头_位图(bmp)文件格式分析
  4. 杭电多校HDU 6601 Keen On Everything But Triangle(主席树)题解
  5. ASP.NET profile之 找不到存储过程'dbo.aspnet_CheckSchemaVersion'
  6. 使用猴子测试工具(1)
  7. 学习笔记(4):思科CCNA模拟器Packet Tracer使用入门-路由器的使用(2811、2911)
  8. Laplacian算子-Log算子-Dog算子边缘检测原理合集及实现
  9. 监听浏览器刷新事件,拦截浏览器返回,js监听移动端浏览器页面显示、隐藏
  10. java实现文件下载功能
  11. Bad client credentials
  12. 人人商城 重复授权问题
  13. cropper(裁剪图片)插件使用(案例)
  14. 一个Java画图板程序的设计
  15. 靠谱的录屏软件 + mp4格式转换软件
  16. 网格布局(grid布局)
  17. 网狐子游戏二人牛牛机器人不起作用的解决办法
  18. POI导出Excel遇到数据量大该如何解决
  19. 用代码来过端午节---基于HTML的端午节划龙舟小游戏
  20. Google收购摩托罗拉将导致多个拐点

热门文章

  1. handler中的handler.removecallbacks和handler.removemessages的用法
  2. 项目中的风险有哪些?测试人员或者管理者如何控制风险?
  3. IGWO-SVM:改良的灰狼优化算法改进支持向量机。 采用三种改进思路:两种Logistic和Tent混沌映射和采用DIH策略
  4. 最新大数据产业生态地图:十大爆发点,百大公司起底
  5. 张俊林:ChatGPT 会成为下一代搜索引擎吗
  6. 多元函数泰勒级数展开_一元及多元函数的泰勒展开式
  7. 人工智能细分领域龙头企业排行榜单
  8. Route命令使用详解
  9. k短路 k shortest path 入门
  10. 复杂交通流对混合交通的影响研究多向车流量分析