All Downloads are FREE. Search and download functionalities are using the official Maven repository.

coursier.cli.Fetch.scala Maven / Gradle / Ivy

The newest version!
package coursier
package cli

import java.io.File

import caseapp._

import scala.language.reflectiveCalls

case class Fetch(
  @Recurse
    options: FetchOptions
) extends App {

  val helper = new Helper(options.common, remainingArgs, ignoreErrors = options.artifactOptions.force)

  val files0 = helper.fetch(
    sources = options.sources,
    javadoc = options.javadoc,
    artifactTypes = options.artifactOptions.artifactTypes(
      options.sources || options.common.classifier0("sources"),
      options.javadoc || options.common.classifier0("javadoc")
    )
  )

  // Some progress lines seem to be scraped without this.
  Console.out.flush()

  val out =
    if (options.classpath)
      files0
        .map(_.toString)
        .mkString(File.pathSeparator)
    else
      files0
        .map(_.toString)
        .mkString("\n")

  println(out)

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy