简体   繁体   English

Maven依赖项无法下载

[英]Maven dependencies fail to download

I am working in a corporate network. 我在公司网络工作。

I can't download artifacts through maven, but I can download them individually through my web browser. 我不能通过maven下载工件,但我可以通过我的网络浏览器单独下载它们。

This is the error: 这是错误:

[ERROR] Non-resolvable import POM: Could not transfer artifact com.fasterxml.jackson:jackson-bom:pom:2.9.8 from/to central (https://repo1.maven.org/maven2): Can't connect to SOCKS proxy:Connection refused: connect @ org.springframework.boot:spring-boot-dependencies:2.1.3.RELEASE, C:\Users\alfonso\.m2\repository\org\springframework\boot\spring-boot-dependencies\2.1.3.RELEASE\spring-boot-dependencies-2.1.3.RELEASE.pom, line 605, column 25

For what I have googled, a lot of people solve this configuring a proxy. 对于我用Google搜索的内容,很多人都在解决这个问题。 I don't understand why I would need that, because as I said, I can download the dependencies trough my web browser. 我不明白为什么我需要它,因为正如我所说,我可以通过我的网络浏览器下载依赖项。

If configuring a proxy is the only way, any idea as to how to identify my company's proxy?? 如果配置代理是唯一的方法,任何想法如何识别我公司的代理? I've no idea what it is. 我不知道它是什么。 Is it supposed to be a "maven proxy" or just a simple proxy? 它应该是一个“maven代理”还是一个简单的代理? I ask because IT people probably don't know much about java and maven. 我问,因为IT人员可能对java和maven知之甚少。 So if I ask them what is our maven proxy, they may not know what I'm talking about (if it is something at all he he) 所以,如果我问他们我们的maven代理是什么,他们可能不知道我在说什么(如果他是他的话)

Downloading the dependencies through a browser is a nightmare because standard Maven projects need hundreds of artifacts (Maven plugins etc.). 通过浏览器下载依赖项是一场噩梦,因为标准的Maven项目需要数百个工件(Maven插件等)。

The proxy is not a "Maven proxy", but a company thing. 代理不是“Maven代理”,而是公司的事情。 You need to find out which proxy allows access to MavenCentral. 您需要找出允许访问MavenCentral的代理。 If you don't have such proxy, you need to discuss a solution like eg setting up your own Nexus/Artifactory and giving it access to MavenCentral. 如果您没有此类代理,则需要讨论一个解决方案,例如设置您自己的Nexus / Artifactory并授予其访问MavenCentral的权限。

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

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