java 与 http://repo.maven.apache.org 的连接被拒绝

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/13442785/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-31 12:43:52  来源:igfitidea点击:

Connection to http://repo.maven.apache.org refused

javamaven

提问by MrProper

I do want to use maven at home for my project, but I can't connect to central repository.

我确实想在家中为我的项目使用 maven,但我无法连接到中央存储库。

I saw some people suggesting using proxy, but what proxy should I use? How do I determine it? I am very confused about this.

我看到有人建议使用代理,但我应该使用什么代理?我如何确定它?我对此感到非常困惑。

If someone could explain what I need to do step by step I would be very grateful.

如果有人可以解释我需要逐步做什么,我将不胜感激。



Edit

编辑

This turned out to be a firewall issue.

结果证明这是防火墙问题。

回答by Andrzej Jozwik

See Manually Overriding the Built-in Repositories. Or add to your pom (the same for pluginRepository):

请参阅手动覆盖内置存储库。或者添加到你的 pom(pluginRepository 相同):

<repository>              
          <id>central</id>
          <name>Central</name>
          <url>http://repo1.maven.org/maven2</url>
</repository>