7

I am trying to build a maven project. Following are specifications of system and maven version:

Apache Maven 3.5.0,
Java version: 1.8.0_121, vendor: Oracle,
Corporation Default locale: en_IN, platform encoding: Cp1252,
OS name:    "windows 10", version: "10.0", arch: "amd64", family:    "windows"

on running mvn install command I am getting following error.

[WARNING] Could not transfer metadata com.googlecode.wicket-jquery-ui:wicket-kendo-ui:8.0.0-SNAPSHOT/maven-metadata.xml from/to sonatype-snapshots (http://oss.sonatype.org/content/repositories/snapshots/): Error transferring file: Server returned HTTP response code: 407 for URL: http://oss.sonatype.org/content/repositories/snapshots/com/googlecode/wicket-jquery-ui/wicket-kendo-ui/8.0.0-SNAPSHOT/maven-metadata.xml from http://oss.sonatype.org/content/repositories/snapshots/com/googlecode/wicket-jquery-ui/wicket-kendo-ui/8.0.0-SNAPSHOT/maven-metadata.xml with proxyInfo ProxyInfo{host='', userName='null', port=, type='http', nonProxyHosts='null'}

I am working behind proxy so I have added following mapping in settings.xml which is inside %MAVEN_HOME%\conf:

<proxies>
    <proxy>
      <id>optional</id>
      <active>true</active>
      <protocol>http</protocol>
      <username>username</username>
      <password>password</password>
      <host>proxyhost</host>
      <port>proxyport</port>
      <nonProxyHosts>local.net|some.host.com</nonProxyHosts>
    </proxy>
</proxies>

even after adding username and password in settings.xml it is considering username as null and throwing 407 authentication error. Its causing problem to build the project. Please help to resolve this.

Update:

variables:

MAVEN_HOME=D:\Apache\Maven\apache-maven-3.5.0 M2_HOME=D:\Apache\Maven\apache-maven-3.5.0

Complete mvn -version :

Apache Maven 3.5.0 (ff8f5e7444045639af65f6095c62210b5713f426; 2017-04-04T01:09:06+05:30) Maven home: D:\Apache\Maven\apache-maven-3.5.0\bin.. Java version: 1.8.0_121, vendor: Oracle Corporation Java home: C:\Program Files\Java\jdk1.8.0_121\jre Default locale: en_IN, platform encoding: Cp1252 OS name: "windows 10", version: "10.0", arch: "amd64", family:"windows"

Anuja Kothekar
  • 2,537
  • 2
  • 15
  • 28
  • can you share complete details of `mvn -version` and the `%MAVEN_HOME%\` configured by you. – Naman Aug 22 '17 at 04:31
  • `from/to sonatype-snapshots´ Maven is trying to transfer an artifcat from/your snapshot-repository. Make sure your credentials for the snapshot repository (tag ``) are correct - meaning there is an entry in your settings.xml with same ID as your snapshot repository and providing username, password – bish Aug 22 '17 at 04:35
  • @nullpointer updated details in question – Anuja Kothekar Aug 22 '17 at 04:52
  • @bish yes credentials are correct. – Anuja Kothekar Aug 22 '17 at 04:53
  • Could you try figuring out which settings.xml is being used by maven. Hint: https://stackoverflow.com/questions/1261215/maven-command-to-determine-which-settings-xml-file-maven-is-using – Naman Aug 22 '17 at 05:56
  • It is using the same settings.xml where I have added proxy. Already checked with -X. – Anuja Kothekar Aug 22 '17 at 06:27

0 Answers0