Error in resolving buildtime dependencies while installing CloudStack on ubuntu.

后端 未结 4 1938
情话喂你
情话喂你 2020-12-10 12:54

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 <

相关标签:
4条回答
  • 2020-12-10 13:37

    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.

    0 讨论(0)
  • 2020-12-10 13:43

    The problem was that i am using a proxy network and maven was not configured for the same. so i made changes in apache-maven-3.0.5/conf/settings.xml refer to this link for more in formation http://maven.apache.org/guides/mini/guide-proxies.html

    0 讨论(0)
  • 2020-12-10 13:44

    If you get this issue but at the same can access the URL using browser, then doing mvn clean before mvn install may solve the problem. This solved my problem.

    0 讨论(0)
  • 2020-12-10 13:49

    I don't know why, but since this worked for me, I'm sharing it hoping to save someone's time:

    I'm on a Windows7 previously used by other people, and I've discovered that the

    %MAVEN_HOME% \ conf \ settings.xml

    contained the following line:

    <localRepository>C:/m2/repository</localRepository>
    

    probably to share a repository across different users.
    This was causing the problem, because when I've changed that line to:

    <localRepository>C:/Users/my_user_name/.m2/repository</localRepository>
    

    , it started working perfectly! From command line, from Eclipse with external Maven, and from Eclipse with the Embedded one.

    Before this, no artifact resolution was working.

    Probably it was something related to writing permissions under the root folder...

    Hope that helps.

    0 讨论(0)
提交回复
热议问题