mirror of https://github.com/sbt/sbt.git
Fixes https://github.com/sbt/sbt/issues/3570
The primary motivation for bringing in Gigahorse was to speed up the dependency resolution, especially in a high-latency environment like Australia, by enabling keep-alive. One of unintended consequences was that it ended up exposing either a bug in okhttp or Nexus / Artifactory's handling of keep-alive, since corporate users behind these proxy repositories started to experience problem publishing. Multiple people have also reported that putting network proxies like HAProxy works around this issue, which seems consistent with the theory.
Now that dependency resolution has switched to using Coursier by default, I am just going to flip the default here so publishing would use Ivy's default URL handler based on `java.net.HttpURLConnection` -
|
||
|---|---|---|
| bin | ||
| core | ||
| ivy/src | ||
| notes | ||
| project | ||
| scripted-test/src/sbt-test/lmScriptedTest | ||
| .gitignore | ||
| .java-version | ||
| .scalafmt.conf | ||
| .travis.yml | ||
| README.md | ||
| build.sbt | ||
| sbt-allsources.sh | ||
README.md
librarymanagement module for sbt
scala> import java.io.File
import java.io.File
scala> import sbt.librarymanagement._, syntax._
import sbt.librarymanagement._
import syntax._
scala> val log = sbt.util.LogExchange.logger("test")
log: sbt.internal.util.ManagedLogger = sbt.internal.util.ManagedLogger@c439b0f
scala> val lm = {
import sbt.librarymanagement.ivy._
val ivyConfig = InlineIvyConfiguration().withLog(log)
IvyDependencyResolution(ivyConfig)
}
lm: sbt.librarymanagement.DependencyResolution = sbt.librarymanagement.DependencyResolution@6a9b40f8
scala> val module = "commons-io" % "commons-io" % "2.5"
module: sbt.librarymanagement.ModuleID = commons-io:commons-io:2.5
scala> lm.retrieve(module, scalaModuleInfo = None, new File("target"), log)
res0: Either[sbt.librarymanagement.UnresolvedWarning,Vector[java.io.File]] = Right(Vector(target/jars/commons-io/commons-io/commons-io-2.5.jar, target/jars/commons-io/commons-io/commons-io-2.5.jar, target/jars/commons-io/commons-io/commons-io-2.5.jar))