Maven clean install无法从maven中心获取工件

时间:2014-01-02 10:31:28

标签: maven

将远程仓库克隆到Linux远程计算机后,尝试运行mvn clean install时出现以下错误:

[ERROR] The build could not read 1 project -> [Help 1] [ERROR]
[ERROR]     Non-resolvable parent POM: Could not transfer artifact xxxxx
from/to central (http://repo.maven.apache.org/maven2):                                           Connection to http://repo.maven.apache.org refused and 'parent.relativePath' points at wrong local POM @ line 4, column 10: Connection timed out -> [Help 2]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] 
[ERROR] [Help 2] 

在Linux上运行mvn命令时,这些错误仅发生 ,项目在Windows环境mvn clean install之后成功构建...

关于为什么在Linux机器上发生这种情况的任何想法?

谢谢

1 个答案:

答案 0 :(得分:2)

  

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

上述消息似乎是由于网络故障。正如你所说它在Windows上而不是在Linux上成功构建,我设想你的linux配置文件中必须有一些不同的网络设置。你有没有添加任何代理?检查maven proxy setting然后重试。