![59e6d373cb651a744fa08bc8c344ffc6.png](https://i-blog.csdnimg.cn/blog_migrate/03d014558508b1ff0edfa6e52cc238b4.jpeg)
maven构建的时候本地有jar还是报错 ,最近遇到这个问题记录一下解决方法。
先说两种解决办法:
- 删除本地仓库中构件目录里的_remote.repositories 和.lastUpdated文件。
- 修改_remote.repositories 里面nexus= 为central=
下边是删除文件的两种脚本
1. powershell脚本
powershell 里切换到repo目录 执行
Get-ChildItem
2. bat批处理
或者 保存下边批处理内容 为"清理.bat",双击这个脚本
@
修改文件内容的脚本暂时没写。┑( ̄Д  ̄)┍
导致问题的原因
maven出错就是换了私服导致的
![c094196f55fd163b78e4b953ccaf9783.png](https://i-blog.csdnimg.cn/blog_migrate/e47a6d0fdfa4d495cb5354ddacb00d5d.png)
根据出现出错的jar 找到对应的目录查看_remote.repositories内容
#NOTE: This is a Maven Resolver internal implementation file, its format can be changed without prior notice.
#Tue Nov 24 17:10:29 CST 2020
html2image-0.9.pom>nexus=
html2image-0.9.jar>nexus=
>nexus= 就是之前指定的私服