From cf269c6895e19f2d590f08811406724304332950 Mon Sep 17 00:00:00 2001 From: Alexandre Archambault Date: Thu, 31 Dec 2015 16:26:18 +0100 Subject: [PATCH] Make ivy2local an IvyRepository --- cache/src/main/scala/coursier/Cache.scala | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/cache/src/main/scala/coursier/Cache.scala b/cache/src/main/scala/coursier/Cache.scala index e66bda7e1..513ca3edd 100644 --- a/cache/src/main/scala/coursier/Cache.scala +++ b/cache/src/main/scala/coursier/Cache.scala @@ -6,6 +6,8 @@ import java.nio.file.{ StandardCopyOption, Files => NioFiles } import java.security.MessageDigest import java.util.concurrent.{ConcurrentHashMap, Executors, ExecutorService} +import coursier.ivy.IvyRepository + import scala.annotation.tailrec import scalaz._ import scalaz.concurrent.{ Task, Strategy } @@ -464,9 +466,11 @@ object Cache { } } - lazy val ivy2Local = MavenRepository( - new File(sys.props("user.home") + "/.ivy2/local/").toURI.toString, - ivyLike = true + lazy val ivy2Local = IvyRepository( + // a bit touchy on Windows... - don't try to get the URI manually like s"file://..." + new File(sys.props("user.home") + "/.ivy2/local/").toURI.toString + + "[organisation]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/" + + "[artifact](-[classifier]).[ext]" ) val defaultConcurrentDownloadCount = 6