I want to share my experience of using maven through a proxy.
You would most likely face exceptions and messages like:
repository metadata for: 'org.apache.maven.plugins' could not be retrieved from repository: central due to an error: Error transferring file: Connection refused: connect
or
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-clean- plugin:2.5: Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-clean-plugin:jar:2.5
How to configure Maven to use proxy server?
Those are caused most likely by 2 issues:
If some of those are omitted – maven could fail with random error messages.
Just hope I’ve saved somebody from googling around this issue for 6 hours, like I did.