Skip to content

Instantly share code, notes, and snippets.

@devops-school
Created February 18, 2020 14:04
Show Gist options
  • Save devops-school/eb7c311c26937698b2f4b2f30e593cf5 to your computer and use it in GitHub Desktop.
Save devops-school/eb7c311c26937698b2f4b2f30e593cf5 to your computer and use it in GitHub Desktop.
Working with Internet Proxy for Maven
$ $ mvn archetype:generate -DgroupId=com.benz.software -DartifactId=chat -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false -DproxySet=true -DproxyHost=53.244.194.32 -DproxyPort=3128 -DproxyUsername=<USER> -DproxyPassword=<PASSWOR
$ mvn clean package -DproxySet=true -DproxyHost=53.244.194.32 -DproxyPort=3128 -DproxyUsername=<USER> -DproxyPassword=<PASSWORD>
$ mvn [COMMAND] -Dhttp.proxyHost=[PROXY_SERVER] -Dhttp.proxyPort=[PROXY_PORT] -Dhttp.nonProxyHosts=[PROXY_BYPASS_IP]
$ mvn install -Dhttp.proxyHost=10.10.0.100 -Dhttp.proxyPort=8080 -Dhttp.nonProxyHosts=localhost|127.0.0.1
# You can create alias for convenient uses:
$ alias proxy-mvn=”mvn -Dhttp.proxyHost=SERVER -Dhttp.proxyPort=PORT -Dhttp.nonProxyHosts=BYPASS_PROXY_IPS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment