diff --git a/cli/src/main/scala/coursier/cli/Coursier.scala b/cli/src/main/scala/coursier/cli/Coursier.scala index 118650904..8db260448 100644 --- a/cli/src/main/scala/coursier/cli/Coursier.scala +++ b/cli/src/main/scala/coursier/cli/Coursier.scala @@ -27,6 +27,8 @@ case class Coursier(scope: List[String], base.relativize(f.toURI).getPath val logger: RemoteLogger with ArtifactDownloaderLogger = new RemoteLogger with ArtifactDownloaderLogger { + def println(s: String) = Console.err.println(s) + def downloading(url: String) = println(s"Downloading $url") def downloaded(url: String, success: Boolean) = @@ -91,7 +93,7 @@ case class Coursier(scope: List[String], ).run if (!res.isDone) { - println(s"Maximum number of iteration reached!") + Console.err.println(s"Maximum number of iteration reached!") sys exit 1 } @@ -100,7 +102,7 @@ case class Coursier(scope: List[String], val trDeps = res.dependencies.toList.sortBy(repr) - println("\n" + trDeps.map(repr).mkString("\n")) + println("\n" + trDeps.map(repr).distinct.mkString("\n")) if (res.conflicts.nonEmpty) { // Needs test diff --git a/core/src/main/scala/coursier/package.scala b/core/src/main/scala/coursier/package.scala index 0ac3d7d90..881ea8139 100644 --- a/core/src/main/scala/coursier/package.scala +++ b/core/src/main/scala/coursier/package.scala @@ -7,7 +7,7 @@ package object coursier { object Dependency { def apply(module: Module, version: String, - scope: Scope = Scope.Other(""), // Subsituted by Resolver with its own default scope (compile) + scope: Scope = Scope.Other(""), // Substituted by Resolver with its own default scope (compile) `type`: String = "jar", classifier: String = "", exclusions: Set[(String, String)] = Set.empty,