sbt won't resolve internal repositories with proxy set when importing project (Scala plugin, no separate sbt plugin)
My friends have been making fun of me because I'm insisting on trying to get the Scala plugin working without the no-longer-developed sbt plugin. And I think I've just done it.
Set 'Use sbt shell' so you can see what's going on. And you'll see while most of the proxy settings are transported to JVM arguments (-Dhttp.proxyHost -Dhttp.proxyUser -Dhttp.proxyPassword) -Dhttp.nonProxyHosts is not. You have to specify it in Settings/Build Tools/sbt/JVM Arguments. For whatever reason, it gets quotes around it, but they don't seem to hurt anything.
java -agentlib:jdwp=transport=dt_socket,address=localhost:55147,suspend=n,server=y -Xdebug -server -Xmx4096M -Dsbt.override.repos=true -Dsbt.repository.config=project\sbt.repositories "-Dhttp.nonProxyHosts=*.baml.com|*.bankofamerica.com|*.ml.com" -Dhttp.proxyHost=internalProxy -Dhttp.proxyPort=8080 -Dhttp.proxyUser=yourMother -Dhttp.proxyPassword=I♡pupπes -Dfile.encoding=UTF-8 -Didea.runid=2017.2 -Didea.managed=true -jar project\sbt-launch.jar idea-shell
You don't seem to be able to operate without a proxy. Something in IntelliJ insists on going out to bintray, and sbt itself seems very attached to typesafe.
I also had the garbage collector blow up the heap during import in 2017.3, so I set the Maximum heap size to 4096 MB.
请先登录再写评论。
SBT proxy handling is currently a bit of a mess but it looks like it is being cleaned up - see https://youtrack.jetbrains.com/issue/SCL-13320
You know, it's possible I set HTTPS_PROXY in a runtime environment variable to get this to work. I'll check next week.