sbt, the interactive build tool
Go to file
eugene yokota c53aa4a6df
Merge pull request #273 from eed3si9n/fport/collapse-eviction-warnings
Collapse eviction warnings
2018-10-18 15:06:45 -04:00
common-test/src/main/scala/sbt/internal/librarymanagement Remove a bunch of compilation warnings 2018-02-15 09:26:13 +00:00
core Collapse eviction warnings 2018-10-18 14:10:59 -04:00
ivy/src Drop trailing commas.. 2018-10-18 14:11:04 -04:00
notes Library management API 2017-07-15 11:17:23 -04:00
project sbt-scalafmt 0.15 to align with sbt/sbt 2018-10-15 03:10:00 -04:00
scripted-test/src/sbt-test/lmScriptedTest/simple Scripted integration test infrastructure with Sbt 2018-10-12 09:18:17 +01:00
.gitignore Scripted integration test infrastructure with Sbt 2018-10-12 09:18:17 +01:00
.java-version Cross publish to Scala 2.12 2017-01-07 00:49:45 -05:00
.scalafmt.conf Add back, re-configure & re-enable Scalafmt 2017-08-10 12:04:58 +01:00
.travis.yml Scripted integration test infrastructure with Sbt 2018-10-12 09:18:17 +01:00
README.md rename to DependencyResolutionInterface 2017-07-15 11:17:23 -04:00
build.sbt Scripted integration test infrastructure with Sbt 2018-10-12 09:18:17 +01:00
sbt-allsources.sh sbt-contraband 0.3.0-M4 2017-03-17 23:03:37 -04:00

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))