我正在尝试建立一个maven项目。以下是系统和maven版本的规范:
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"
关于运行mvn install
命令我收到以下错误。
[警告]无法传输元数据 com.googlecode.wicket-jQuery的用户界面:检票剑术的UI:8.0.0-SNAPSHOT /行家-metadata.xml中 从/到sonatype-snapshots (http://oss.sonatype.org/content/repositories/snapshots/):错误 传输文件:服务器返回HTTP响应代码:407为URL: http://oss.sonatype.org/content/repositories/snapshots/com/googlecode/wicket-jquery-ui/wicket-kendo-ui/8.0.0-SNAPSHOT/maven-metadata.xml 从 http://oss.sonatype.org/content/repositories/snapshots/com/googlecode/wicket-jquery-ui/wicket-kendo-ui/8.0.0-SNAPSHOT/maven-metadata.xml 与proxyInfo ProxyInfo {host ='',userName ='null',port =, type ='http',nonProxyHosts ='null'}
我在代理服务器后面工作,所以我在settings.xml中添加了以下映射,该映射位于%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>
即使在settings.xml中添加用户名和密码,它也会将username视为null并抛出407认证错误。它导致了构建项目的问题。请帮忙解决这个问题。
更新
变量:
MAVEN_HOME = d:\阿帕奇\ Maven的\ Apache的行家-3.5.0 M2_HOME = d:\阿帕奇\ Maven的\ Apache的行家-3.5.0
完成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版本:1.8.0_121, 供应商:Oracle Corporation Java home:C:\ Program Files \ Java \ jdk1.8.0_121 \ jre默认语言环境:en_IN,平台编码: Cp1252操作系统名称:“windows 10”,版本:“10.0”,arch:“amd64”, 家族: “窗口”