maven的pom.xml第一行报错以及ArtifactTransferException: Could not transfer artifact.....和 CoreException...的问题

之前还好好的,今天打开后,就报了很多错误,而且都类似,如下:

(1)ArtifactDescriptorException: Failed to read artifact descriptor for log4j:log4j:jar:1.2.17: ArtifactResolutionException: Failure to transfer log4j:log4j:pom:1.2.17 from http://repo1.maven.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 log4j:log4j:pom:1.2.17 from/to central (http://repo1.maven.org/maven2): The operation was cancelled.	pom.xml	/face	line 1	Maven Dependency Problem
(2)ArtifactTransferException: Could not transfer artifact com.baidu.aip:java-sdk:jar:4.5.0 from/to central (http://repo1.maven.org/maven2): Write error	pom.xml	/face	line 22	Maven Dependency Problem
(3)ArtifactTransferException: Could not transfer artifact org.json:json:jar:20160810 from/to central (http://repo1.maven.org/maven2): invalid version format: 1	pom.xml	/face	line 1	Maven Dependency Problem
查了一下,发现,原来由于网络等原因,相应的jar包没有抓下来,生成了很多 *.lastUpdated 为后缀的文件,以于是根据报错提示,来到本地仓库中,找到报错的文件,点进去后发现真的没有jar包,只有 *lastUpdated 为后缀的文件,删了之后,果然错误减少了不少,但却变成了第一行报错:
ArtifactTransferException: Could not transfer artifact org.json:json:jar:20160810 from/to central (http://repo1.maven.org/maven2): invalid version format: 1	pom.xml	/face	line 1	Maven Dependency Problem
这是由于其他地方也有 *lastUpdated 为后缀的文件,一个一个删不科学,只需在cmd下,进入到本地仓库的目录中,执行此命令,复制粘贴即可:`for /r %i in (*.lastUpdated) do del %i ` 它会自动删除一切 *lastUpdated 为后缀的文件 然后,更新maven项目,如图,我在myeclipse更新我的maven项目后,错误全部消除 ![这里写图片描述](https://img-blog.csdn.net/20180905203213274?watermark/2/text/aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L2xlZ2VuZGFyeWhhaGE=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70) 最新发现:下面这个异常也是上述原因造成,删除 *lastUpdated 的文件后,更新项目,如上图所示,如果有报错没有更新配置,则再更新项目配置,就在update dependencies下面。 ``` CoreException: Could not get the value for parameter compilerId for plugin execution default-testCompile: ```
  • 2
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

legendaryhaha

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值