IntelliJ sbt 项目下载源在代理后面或从 nexus 服务器

IntelliJ sbt project download sources behind proxy or from nexus server

我在代理后面使用 sbt,使用公司 Nexus 服务器。

我的设置工作正常,使用 CNTLM

JAVA_OPTS="-Dhttp.proxyHost=10.0.2.2 -Dhttp.proxyPort=3128 -Dhttps.proxyHost=10.0.2.2 -Dhttps.proxyPort=3128"
SBT_OPTS="-Dsbt.override.build.repos=true"

~/.sbt/repositories

中的 Nexus 设置
[repositories]
  local
  my-ivy-proxy-releases:http://company.com:8081/nexus/content/groups/ivy-releases/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
  my-maven-proxy-releases:http://company.com:8081/nexus/content/groups/mvn-repositories/

一切正常,甚至 "titled problem",如果由 sbt 管理,fe:

libraryDependencies += "org.apache.spark" %% spark-core % "1.6.1" withSources())

可以下载资源:

但是如果我想使用 IntelliJ 中的构建 "download sources" 按钮:

它会给我一个连接错误:

我错过了什么?我什至查看了 IntelliJ 日志,但它们并没有说明什么

2017-04-07 10:52:24,002 [89494035]   WARN - r.InternetAttachSourceProvider - Connection problem. See log for more details. 
com.intellij.jarFinder.SourceSearchException: Connection problem. See log for more details.
    at com.intellij.jarFinder.MavenCentralSourceSearcher.findSourceJar(MavenCentralSourceSearcher.java:65)
    at com.intellij.jarFinder.InternetAttachSourceProvider.run(InternetAttachSourceProvider.java:134)
    at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:726)
    at com.intellij.openapi.progress.impl.CoreProgressManager.run(CoreProgressManager.java:410)
    at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:176)
    at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:556)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:501)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:66)
    at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:163)
    at com.intellij.openapi.application.impl.ApplicationImpl.a(ApplicationImpl.java:594)
    at com.intellij.openapi.application.impl.ApplicationImpl.run(ApplicationImpl.java:334)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
2017-04-07 10:52:38,562 [89508595]   WARN - der.MavenCentralSourceSearcher - Remote host closed connection during handshake 
javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
    at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:992)
    at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375)
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1403)
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1387)
    at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:559)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1513)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1441)
    at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480)
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:338)
    at com.intellij.util.io.HttpRequests.openConnection(HttpRequests.java:511)
    at com.intellij.util.io.HttpRequests.access0(HttpRequests.java:61)
    at com.intellij.util.io.HttpRequests$RequestImpl.getConnection(HttpRequests.java:289)
    at com.intellij.util.io.HttpRequests$RequestImpl.getInputStream(HttpRequests.java:298)
    at com.intellij.util.io.HttpRequests$RequestImpl.getReader(HttpRequests.java:316)
    at com.intellij.jarFinder.SourceSearcher.process(SourceSearcher.java:76)
    at com.intellij.jarFinder.SourceSearcher.process(SourceSearcher.java:72)
    at com.intellij.util.io.HttpRequests.lambda$doProcess[=13=](HttpRequests.java:420)
    at com.intellij.util.net.ssl.CertificateManager.runWithUntrustedCertificateStrategy(CertificateManager.java:349)
    at com.intellij.util.io.HttpRequests.doProcess(HttpRequests.java:420)
    at com.intellij.util.io.HttpRequests.process(HttpRequests.java:395)
    at com.intellij.util.io.HttpRequests.access0(HttpRequests.java:61)
    at com.intellij.util.io.HttpRequests$RequestBuilderImpl.connect(HttpRequests.java:263)
    at com.intellij.jarFinder.SourceSearcher.readDocumentCancelable(SourceSearcher.java:72)
    at com.intellij.jarFinder.MavenCentralSourceSearcher.findSourceJar(MavenCentralSourceSearcher.java:39)
    at com.intellij.jarFinder.InternetAttachSourceProvider.run(InternetAttachSourceProvider.java:134)
    at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:726)
    at com.intellij.openapi.progress.impl.CoreProgressManager.run(CoreProgressManager.java:410)
    at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:176)
    at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:556)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:501)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:66)
    at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:163)
    at com.intellij.openapi.application.impl.ApplicationImpl.a(ApplicationImpl.java:594)
    at com.intellij.openapi.application.impl.ApplicationImpl.run(ApplicationImpl.java:334)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.EOFException: SSL peer shut down incorrectly
    at sun.security.ssl.InputRecord.read(InputRecord.java:505)
    at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:973)
    ... 39 more
2017-04-07 10:52:38,563 [89508596]   WARN - r.InternetAttachSourceProvider - Connection problem. See log for more details. 
com.intellij.jarFinder.SourceSearchException: Connection problem. See log for more details.
    at com.intellij.jarFinder.MavenCentralSourceSearcher.findSourceJar(MavenCentralSourceSearcher.java:65)
    at com.intellij.jarFinder.InternetAttachSourceProvider.run(InternetAttachSourceProvider.java:134)
    at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:726)
    at com.intellij.openapi.progress.impl.CoreProgressManager.run(CoreProgressManager.java:410)
    at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:176)
    at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:556)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:501)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:66)
    at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:163)
    at com.intellij.openapi.application.impl.ApplicationImpl.a(ApplicationImpl.java:594)
    at com.intellij.openapi.application.impl.ApplicationImpl.run(ApplicationImpl.java:334)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)

我不确定,但似乎我并不孤单:

这是 Intellij 中的一个错误,现已解决。