idea2025|maven3.9无法访问http私服的解决方案

报错:

bash 复制代码
Non-resolvable import POM: The following artifacts could not be resolved: com.*.boot:txlc-*-dependencies:pom:2026.01-SNAPSHOT (absent): Could not transfer artifact com.*.boot:txlc-*-dependencies:pom:2026.01-SNAPSHOT from/to maven-default-http-blocker (http://0.0.0.0/): Blocked mirror for repositories: [txlcmaven (http://192.168.10.14:8081/repository/maven-public/, default, releases+snapshots)]

解决:在settings.xml中配置如下:

xml 复制代码
  <mirrors>
	<mirror>
		<!-- 配置私服地址http,注意:默认有一个0.0.0.0的最好删掉 -->
		<id>txlcmaven</id>
		<mirrorOf>*</mirrorOf>
		<url>http://192.168.10.237:8081/repository/maven-public/</url>
		<!-- 针对maven3.9.*允许私服http访问的配置 -->
		<blocked>false</blocked>
	</mirror>
  </mirrors>
  
  <profiles>
    <!-- 针对maven3.9.*允许私服http访问的配置 -->
  	<profile>
        <id>allow-http</id>
        <repositories>
            <repository>
                <id>txlcmaven</id>
                <url>http://192.168.10.237:8081/repository/maven-public/</url>
                <releases>
                    <enabled>true</enabled>
                </releases>
                <snapshots>
                    <enabled>true</enabled>
                </snapshots>
				<allowInsecureProtocol>true</allowInsecureProtocol>
            </repository>
        </repositories>
    </profile>
  </profiles>
  
  <!-- 针对maven3.9.*允许私服http访问的配置 -->
  <activeProfiles>
    <activeProfile>allow-http</activeProfile>
  </activeProfiles>

重启工具再次访问即可

相关推荐
peach2 天前
同样是装依赖,为什么 npm 长成 node_modules,Maven 长成 .m2
npm·node.js·maven
屈冠成2 天前
ShopXO商城系统测试报告
开发语言·spring·maven·lua
jianxuan4 天前
Spring Boot + Maven 接入 Allatori:从普通打包到可选混淆发布
spring boot·python·maven
伞伞悦读4 天前
Maven 下载与配置教程(新手友好版)
maven
2301_32241428045 天前
springboot农产品交易平台的设计与实现08055-计算机毕设 原创(免费领源码+部署教程+开发环境)
java·spring boot·redis·mysql·tomcat·maven·mybatis
何中应6 天前
MySQL 连接驱动单独下载的两种方式
数据库·mysql·maven
开开心心就好6 天前
发票信息录入太麻烦?离线工具一键转表格
运维·服务器·前端·pdf·ocr·maven·intellij-idea
慧都小项8 天前
图解 MyEclipse Deployment Assembly:资源如何进入部署产物?
java·ide·tomcat·maven·myeclipse·部署排查
VX_bysjlw9859 天前
基于协同过滤的美食推荐系统的设计与实现32221-计算机毕设原创(免费领源码+带部署教程)
java·spring boot·redis·mysql·tomcat·maven·mybatis
不像程序员的程序媛10 天前
maven基础
python·pycharm·maven