Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Maven Error- Authorization failed: Not authorized by proxy

I am trying to build opennms in ubuntu.But when i give ./compile.pl(for compiling opennms source) in terminal, i get below error. I am using maven 2.2.1 version. Could anybody please provide a solution.

Note: removed the hyperlink like http in stacktrace..

[WARNING] Unable to get resource 'org.apache.felix:maven-bundle-plugin:pom:1.4.3' from repository java-net-repo (http://maven.opennms.org/content/groups/java.net-release): Authorization failed: Not authorized by proxy.
Downloading: //repo1.maven.org/maven2/org/apache/felix/maven-bundle-plugin/1.4.3/maven-bundle-plugin-1.4.3.pom
[WARNING] Unable to get resource 'org.apache.felix:maven-bundle-plugin:pom:1.4.3' from repository central (repo1.maven.org/maven2): Authorization failed: Not authorized by proxy.
Downloading: http://maven.opennms.org/content/groups/opennms.org-release/org/apache/felix/maven-bundle-plugin/1.4.3/maven-bundle-plugin-1.4.3.pom
[WARNING] Unable to get resource 'org.apache.felix:maven-bundle-plugin:pom:1.4.3' from repository opennms-repo (maven.opennms.org/content/groups/opennms.org-release): Authorization failed: Not authorized by proxy.
Downloading: repo1.maven.org/maven2/org/apache/felix/maven-bundle-plugin/1.4.3/maven-bundle-plugin-1.4.3.pom
[WARNING] Unable to get resource 'org.apache.felix:maven-bundle-plugin:pom:1.4.3' from repository central (//repo1.maven.org/maven2): Authorization failed: Not authorized by proxy.
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).
like image 393
maali Avatar asked Mar 01 '11 06:03

maali


1 Answers

Ensure you have proper username & password for the proxy authentication in your settings file.

 <proxies>
   <proxy>
      <active>true</active>
      <protocol>http</protocol>
      <host>proxy.somewhere.com</host>
      <port>8080</port>
      <username>proxyuser</username>
      <password>somepassword</password>
      <nonProxyHosts>www.google.com|*.somewhere.com</nonProxyHosts>
    </proxy>
  </proxies>

http://maven.apache.org/guides/mini/guide-proxies.html

like image 192
isobar Avatar answered Oct 23 '22 03:10

isobar