I’m using Ubuntu with Gnome where I can set network proxy settings (with authentication).
The question is: how I can run maven in command line and make it use this proxy?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There is a
java.net.useSystemProxiessystem property that can be set totrue(on Windows and Linux platforms) to tell the JVM to use the system proxy settings. From the Java Networking and Proxies guide:But this will only work for the
java.net.*classes, not for commons-httpclient, jsch, etc. So this doesn’t solve the whole issue and Maven doesn’t really support it (this is logged as MNG-728).In other words, I’m afraid you’ll have to configure the proxy settings in your
~/.m2/settings.xml.