maven 配置http私服Since Maven 3.8.1 http repositories are blocked. 报错处理

发布时间:2024年01月18日

刷maven报错

com.saas:pdf:pom:0.0.1 failed to transfer from http://0.0.0.0/ during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of maven-default-http-blocker has elapsed or updates are forced. Original error: Could not transfer artifact com.saas:pdf:pom:0.0.1 from/to maven-default-http-blocker (http://0.0.0.0/): Blocked mirror for repositories: [saas.com (http://192.168.31.109:8081/service/rest/repository/browse/maven-public/, default, releases+snapshots)]

Since Maven 3.8.1 http repositories are blocked.

Possible solutions:
- Check that Maven pom files do not contain http repository http://192.168.31.109:8081/service/rest/repository/browse/maven-public/
- Add a mirror(s) for http://192.168.31.109:8081/service/rest/repository/browse/maven-public/ that allows http url in the Maven settings.xml
- Downgrade Maven to version 3.8.1 or earlier in settings

这个错的原因是:Maven从3.8.1版本开始就禁用了http仓库

简单粗暴的方法,直接降级Maven到apache-maven-3.6.3

文章来源:https://blog.csdn.net/xiaoxionglove/article/details/135661593
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。