Running on Windows XP, I installed my ~ / .m2 / settings.xml file to enable the following proxy settings:
<proxy> <id>optional</id> <active>true</active> <protocol>http</protocol> <username>davidho</username> <password>mypassword</password> <host>192.168.0.35</host> <port>3128</port> <nonProxyHosts>local.net|some.host.com</nonProxyHosts> </proxy>
mvn archetype: generate, then do a great job by downloading all the necessary files and doing the following.
But then I tried
mvn compile
and received:
Plugin org.apache.maven.plugins: maven-resources-plugin: 2.6 or one of its dependencies cannot be resolved: Failed to read the artifact descriptor for org.apache.maven.plugins: maven-resources-plugin: jar: 2.6: Failed to transfer artifact org.apache.maven.plugins: maven-resources-plugin: pom: 2.6 from / to central (http.//repo.maven.apache.org/maven2): File transfer error: server returned HTTP response code : 407 for URL: http.//repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-resources-plugin/2.6/maven-resources-plugin-2.6.pom with http.//repo .maven.apache.org / maven2 / org / apache / maven / plugins / maven-resources-plugin / 2.6 / maven-resources-plugin-2.6.pom with proxyInfo ProxyInfo {host = '192.168.0.35', userName = 'null ', port = 3128, type =' http ', nonProxyHosts =' null '}
A? Why does he say userName = 'null' when I specified the username and password in my settings.xml?
Then I tried:
mvn compile -Dhttp.proxyUser = davidho -Dhttp.proxyPassword = mypassword
and it didn't matter - it still said userName = 'null'
How can I fix this thanks?
nb stackoverflow made me change "http:" in the error message to "http."
source share