SBT cannot resolve dependencies through proxy
When I run sbt update
I get this error
:: problems summary ::
:::: WARNINGS
::::::::::::::::::::::::::::::::::::::::::::::
:: UNRESOLVED DEPENDENCIES ::
::::::::::::::::::::::::::::::::::::::::::::::
:: org.scala-sbt#sbt;0.13.8: several problems occurred while resolving dependency: org.scala-sbt#sbt;0.13.8 {default=[default(compile)]}:
java.util.NoSuchElementException
java.util.NoSuchElementException
::::::::::::::::::::::::::::::::::::::::::::::
:: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS
unresolved dependency: org.scala-sbt#sbt;0.13.8: several problems occurred while resolving dependency: org.scala-sbt#sbt;0.13.8 {default=[default(compile)]}:
java.util.NoSuchElementException
java.util.NoSuchElementException
Error during sbt execution: Error retrieving required libraries
(see /Users/$USER/.sbt/boot/update.log for complete log)
Error: Could not retrieve sbt 0.13.8
I've already set up the system to work with curl and homebrew using a proxy, but for some reason sbt won't work with the same settings. When I turn off the proxy, it just hangs for a few minutes before it times out and I don't get the above error.
I tried this too but with no luck
# export JAVA_FLAGS= -Dhttp.proxyHost=$domain -Dhttp.proxyPort=$portnum -Dhttp.proxyUser=$USER -Dhttp.proxyPassword=$password -Dhttps.proxyHost=$domain -Dhttps.proxyPort=$portnum -Dhttps.proxyUser=$USER -Dhttps.proxyPassword=$password -Dftp.proxyHost=$domain -Dftp.proxyPort=$portnum -Dftp.proxyUser=$USER -Dftp.proxyPassword=$password -Dhttp.nonProxyHosts=$noproxy -Dhttps.nonProxyHosts=$noproxy -Dftp.nonProxyHosts=$noproxy
# java ${JAVA_FLAGS}
The method that I used to create the hombu and curls,
export http_proxy=$http_proxy
export https_proxy=$http_proxy
export ftp_proxy=$http_proxy
export rsync_proxy=$http_proxy
export HTTP_PROXY=$http_proxy
export HTTPS_PROXY=$http_proxy
export FTP_PROXY=$http_proxy
export RSYNC_PROXY=$http_proxy
Any suggestions?
thank
source to share
I'm not sure if your JAVA_FLAGS is included / exported on the classpath or not unless you add it to the classpath before trying this solution.
My resurrection: I don't know which IDE you are using, I faced the same problem (I am using IntelliJ 14). Try to link your IDE, if using another, basically install it via VM arguments.
I solved this problem by adding vm arguments ...
Steps to add to IntelliJ:
File -> Default Settings -> under Build, Execution, Deployment
Build Tools -> SBT ->
JVM parameters -> set in "VM" parameters as shown
-Dhttp.proxyHost = http://proxy.xxxx.com -Dhttp.proxyPort = 8080 -Dhttps.proxyHost = http://proxy.xxx.com -Dhttps.proxyPort = 8080 -XX: MaxPermSize = 384M -Duser.home = / Users / yourusername / -Dsbt.ivy.home = / Users / yourusername / .ivy2
Luck
source to share