maven: Caused by: The following artifacts could not be resolvedfrom/to maven-default-http-blocker (
·
maven 无法从仓库中下载包,原因是http协议被阻止。
方案一:更换为https
方案二:允许 HTTP 访问(不推荐用于生产)
在 Maven 的 settings.xml 中添加以下配置来允许 HTTP 访问:
xml
<mirror> <id>maven-default-http-blocker</id> <mirrorOf>external:http:*</mirrorOf> <name>Pseudo repository to mirror external repositories initially using HTTP.</name> <url>http://0.0.0.0/</url> <blocked>false</blocked> </mirror>
或者完全禁用 HTTP 阻止器:
xml
<mirror> <id>maven-default-http-blocker</id> <mirrorOf>dummy</mirrorOf> <name>Dummy mirror to override default http blocker</name> <url>http://0.0.0.0/</url> </mirror>
更多推荐
所有评论(0)