新浪博客

maven项目报程序包不存在问题的解决

2017-05-12 16:32阅读:
项目中升级了struts版本,myeclipse中显示项目正常,但执行maven install后,报以下错误:
error 程序包org.apache.commons.lang3不存在
仔细查看日志,发现有以下warning:
[WARNING] The POM for org.apache.commons:commons-lang3:jar:3.2 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
打开文件C:\Users\Administrator\.m2\repository\org\apache\commons\commons-lang3\3.2\commons-lang3-3.2.pom,发现其内容如下:

No web authentication server is available,

Please contact administrator for help!



文件内容明显不正常,这是因为机器出外网,需要配置代理,之前明显是网络未配置后就执行了maven install,导致返回的pom文件异常。删除目录C:\Users\Administrator\.m2\repository\org\apache\commons\commons-lang3\3.2,并且通过命令以下命令设置好代理,curl www.baidu.com 查看返回结果,确认连外网正常,再执行maven install,问题解决。
set http_proxy=http://username@password:proxy_IP:proxy_port/

我的更多文章

下载客户端阅读体验更佳

APP专享