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"