idea Maven仓库出现xxx.lastUpdate文件,并且Failed to read artifact descriptor for xxx依赖导入失败快速解决方案。

idea Maven仓库出现xxx.lastUpdate文件,并且Failed to read artifact descriptor for xxx依赖导入失败快速解决方案。

问题:
以下面为例,在项目pom.xml中引入


    org.apache.spark
    spark-core_2.12
    3.0.0

依赖后发现标签内容,变红报错,Failed to read artifact descriptor for spark-core_2.12, 并且查看仓库后,只看到spark-core_2.12.lastUpdate文件。

第一步:在相关文件夹下手动删除 .lastUpdate 结尾的文件。【这一步也可以不做,不影响后面的使用】

第二步:根据你的dependency标签内容,去阿里云

https://maven.aliyun.com/mvn/search

搜索相关的jar包。如下图所示

idea Maven仓库出现xxx.lastUpdate文件,并且Failed to read artifact descriptor for xxx依赖导入失败快速解决方案。_第1张图片输入标签里的groupId artifactId version 三个信息,点击搜索即可。 然后点击后面的下载符号下载。

第三步:回到本地电脑,打开黑窗口,执行maven指令,把jar包导入到本地仓库中。指令如下【这里四个“=”号,指定了下载到本地的jar包位置,和上面三个标签的属性。填进去即可】

mvn install:install-file -Dfile=E:\E\test\spark-core_2.12-3.0.0.jar -DgroupId=org.apache.spark -DartifactId=spark-core_2.12 -Dversion=3.0.0 -Dpackaging=jar

此时本地仓库中依赖就已经加载进来了。

第四步:进入idea项目 右键点击项目-> maven -> Reload project. 即可。

你可能感兴趣的:(spark,maven,大数据)