How to use coursier with a Proxy

946 Views Asked by At

Coursier is a Scala Download Tool. The instructions say to use -Dhttps.proxyHost, but it did not work for me:

./coursier bootstrap --java-opt -Xss4m --java-opt -Xms100m --java-opt -Dmetals.client=emacs   -Dhttps.proxyHost=127.0.0.1 -Dhttps.proxyPort=8080 org.scalameta:metals_2.12:0.7.6 -r bintray:scalacenter/releases -r sonatype:snapshots -o /usr/local/bin/metals-emacs -f

How do you use coursier (on Ubuntu) with a Proxy?

1

There are 1 best solutions below

0
On BEST ANSWER

You need to use the -J-Dhttps.proxyHost and -J-Dhttps.proxyPort flags:

./coursier bootstrap --java-opt -Xss4m --java-opt -Xms100m --java-opt -Dmetals.client=emacs -J-Dhttps.proxyHost=127.0.0.1 -J-Dhttps.proxyPort=8080 org.scalameta:metals_2.12:0.7.6   -r bintray:scalacenter/releases -r sonatype:snapshots -o /usr/local/bin/metals-emacs -f