Setting up proxy for Maven mojo doesn't work
I want to use proxy in my maven project (to make some builds faster, because when processing Docbook documentation, some DTDs are slow to fetch from some servers).
I have tried following ways how to do it:
1) set it up in Java:
$JAVA_HOME/bin/ControlPanel -> Network Settings
2) in ~/.m2/settings.xml in properties
3) in ~/.m2/settings.xml in a profile, that is activated by default in my projects
4) in the pom.xml's properties
5) environment variable http_proxy:
(I'm using Linux, it works for other command line utilities; I replaced // by -- in the URL to circumvent URL posting restriction of this forum).
6) on the command line:
I have tried it with Maven 2.0.10 and 2.2.1 with the same result. Only the solution 6 works, but that's not what I want to use (I don't want to specify parameters every time I run maven).
mvn some_profiles_and_goals -Dhttp.proxyHost=proxy.myhost.com