首页 > 技术文章 > IDEA项目已添加jar包,Maven却一直报错的几种解决方法

shiysin 2021-08-18 10:38 原文

记录几种解决方法:

  1. 重启IDEA;
  2. 在 Settings - Maven - Runner - VM Options 中添加 -DarchetypeCatalog=internal,优先从本地仓库读取
  3. 删除错误jar包目录中的 _remote.repositories 文件,再重新打包
  4. 把 _remote.repositories 文件中的nexus= 改成 central=
  5. 把 setting.xml 中的 私服 注释掉
  6. 在项目pom目录下打开cmd,运行命令(替换命令中jar包信息):mvn install:install-file -Dfile=d:\amyapp\xxxxxxx.jar -DgroupId=com.alibaba -DartifactId=dubbo -Dversion=2.8.4 -Dpackaging=jar

 

  

 

推荐阅读