简体   繁体   English

Maven:对工件的权限被拒绝

[英]Maven: permission denied to artifactory

When I'am trying to build project with maven and I'am getting an error: could not load dependencies from artifactory. permission denied:connect 当我尝试使用Maven构建项目时,出现一个错误: could not load dependencies from artifactory. permission denied:connect could not load dependencies from artifactory. permission denied:connect . could not load dependencies from artifactory. permission denied:connect

My .m2/settings.xml is ok and VPN connection is up (credentials is ok). 我的.m2/settings.xml正常,并且VPN连接建立(凭据正常)。 Also I can open artifactory from browser or can ping from command line. 另外,我可以从浏览器打开工件,也可以从命令行ping。 I'am using maven 3.2.5 like all teammates. 我正在像所有队友一样使用Maven 3.2.5。

But if I build project from eclipse with embedded maven version (3.0.2), the project builds successfully. 但是,如果我使用嵌入式Maven版本(3.0.2)从eclipse构建项目,则该项目将成功构建。 Also if I'am using maven 3.0.2 locally, there is no problems with connection. 另外,如果我在本地使用maven 3.0.2,则连接没有问题。 The problem just on my pc, the project has no errors. 问题就在我的电脑上,项目没有错误。

If you are using Windows OS, this issue may related to the ipv4/ipv6 Try to add 如果您使用的是Windows操作系统,则此问题可能与ipv4 / ipv6有关。

-Djava.net.preferIPv4Stack=true

when you are running the maven build command 当您运行maven build命令时

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM