Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
649 views
in Technique[技术] by (71.8m points)

maven - Error in resolving buildtime dependencies while installing CloudStack on ubuntu.

I am installing cloudstack on ubuntu and it uses maven to resolve its dependencies. I am getting the following errors when am running the command mvn -P deps

[ERROR] The build could not read 1 project -> [Help 1] 
[ERROR]    
[ERROR]   The project org.apache.cloudstack:cloudstack:4.2.0 (/home/cloud/apache-cloudstack-4.2.0-src/pom.xml) has 1 error 
[ERROR]     Non-resolvable parent POM: Could not transfer artifact org.apache:apache:pom:11 from/to central (http://repo.maven.apache.org/maven2): repo.maven.apache.org: Name or service not known and 'parent.relativePath' points at wrong local POM @ line 14, column 11: Unknown host repo.maven.apache.org: Name or service not known -> [Help 2] 
[ERROR] 

I have searched the error and tried a number of changes in pom.xml but i am not getting the solution. I dont know whats causing the error.

any suggestion or slightest help will be acknowledged. Thank you.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

This is a networking issue:

Your build machine cannot access http://repo.maven.apache.org/maven2

Use wget at command line to check if you can access the website. E.g.

root@mgmtserver:~/cm# wget http://repo.maven.apache.org/maven2
--2013-10-14 16:33:24--  http://repo.maven.apache.org/maven2
Resolving repo.maven.apache.org (repo.maven.apache.org)... 185.31.19.184, 185.31.19.185
Connecting to repo.maven.apache.org (repo.maven.apache.org)|185.31.19.184|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://central.maven.org/maven2/ [following]
--2013-10-14 16:33:24--  http://central.maven.org/maven2/
Resolving central.maven.org (central.maven.org)... 185.31.19.184, 185.31.19.185
Reusing existing connection to repo.maven.apache.org:80.
HTTP request sent, awaiting response... 200 OK
Length: 967 [text/html]
Saving to: `maven2'

100%[=====================================================>] 967         --.-K/s   in 0s

2013-10-14 16:33:24 (74.4 MB/s) - `maven2' saved [967/967]

Reasons why wget might fail:

  1. the Maven repo is temporarily down. Wait until it works.
  2. no network adapter on your build machine. Check that it has network access.
  3. your proxy settings are incorrect. Try this solution, or the Maven mini-guide proxy settings

Background:

Apache CloudStack's POM.xml inherits predefined values from the Apache Software Foundation Parent POM. As a result, a Maven build first downloads the required POM from a network location, and Maven stores it locally in the Maven repository, which is a kind of local cache.

Final remarks:

If you're curious, the source for the POM being download is here.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...