maven: mvn help:system下载包失败错误

网上关于maven怎么配置本地仓和镜像的方法有很多,我就不说了。说一个我自己碰到的问题。

问题是这样的,我按照网上的办法配置本地仓,镜像(https://www.cnblogs.com/liunanjava/archive/2015/11/05/4936037.html),使用 mvn help:system还是报错,不能下载包。但是在公司按照同样的办法配置却可以。

最后发现问题的原因是:10106被占用。请记住这个端口(这个端口好像是不能通过重启电脑来解除占用的)

解决办法:

1,以管理员身份打开命令提示符

2,输入 netsh winsock reset  

3,重启电脑就ok了

可能导致问题出现的原因:

执行mvn help:system时出错,导致该端口一直被占用,等你修改完再进行同样操作时就不能使用端口访问中央库了,导致提示

Downloading from Central: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-clean-plugin:2.5: Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-clean-plugin:jar:2.5
Downloading from Central: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-install-plugin/2.4/maven-install-plugin-2.4.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-install-plugin:2.4: Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-install-plugin:jar:2.4
Downloading from Central: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-deploy-plugin/2.7/maven-deploy-plugin-2.7.pom

[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-deploy-plugin:2.7: Plugin org.apache.maven.plugins:maven-deploy-plugin:2.7 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-deploy-plugin:jar:2.7

.

.

.

.

这种错误。


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值