如何设置Maven代理

1.公司的网络走的是代理,那么如何设置maven下载jar包时也走代理呢.

根据百度出来的两篇文章 设置了一下,但是还是报错. 

Plugin org.apache.maven.plugins:maven-resources-plugin:2.5 or one of its dependencies could not be resolved:
Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.5: 
Could not transfer artifact org.apache.maven.plugins:maven-resources-plugin:pom:2.5 from/to central (http://repo.maven.apache.org/maven2): 
Not authorized by proxy , ReasonPhrase:Proxy Authentication Required. -> [Help 1]

 设置过程是按这篇博客操作的:  Maven代理设置

这个过程应该不存在什么问题,好多地方都是这么说,但在我还是无法下载jar包.原因是需要往maven中添加一个插件包

网上的描述如下:

It is probably an NTLM proxy? If it is:

Download the wagon-http-lightweight-2.2.jar from http://repo.maven.apache.org/maven2/org/apache/maven/wagon/wagon-http-lightweight/2.2/wagon-http-lightweight-2.2.jar

Copy the wagon-http-lightweight-2.2.jar to %M2_HOME%/lib/ext folder.

添加jar包后运行正常! 

 

转载于:https://www.cnblogs.com/hoonick/p/10754995.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值