1.公司的網絡走的是代理,那么如何設置maven下載jar包時也走代理呢.
根據百度出來的兩篇文章 設置了一下,但是還是報錯.
Plugin org.apache.maven.plugins:maven-resources-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.5: Could not transfer artifact org.apache.maven.plugins:maven-resources-plugin:pom:2.5 from/to central (http://repo.maven.apache.org/maven2): Not authorized by proxy , ReasonPhrase:Proxy Authentication Required. -> [Help 1]
設置過程是按這篇博客操作的: Maven代理設置
這個過程應該不存在什么問題,好多地方都是這么說,但在我還是無法下載jar包.原因是需要往maven中添加一個插件包
網上的描述如下:
It is probably an NTLM proxy? If it is:
Download the wagon-http-lightweight-2.2.jar from http://repo.maven.apache.org/maven2/org/apache/maven/wagon/wagon-http-lightweight/2.2/wagon-http-lightweight-2.2.jar
Copy the wagon-http-lightweight-2.2.jar to %M2_HOME%/lib/ext folder.
添加jar包后運行正常!