Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
  • Apr 21 09:43
    chris-bannister-privitar commented #2028
  • Apr 19 22:54

    alexarchambault on gh-pages

    Update website (compare)

  • Apr 19 22:18

    alexarchambault on master

    Revert "Mention GSoC in README"… (compare)

  • Apr 19 22:17
    alexarchambault closed #2008
  • Apr 19 22:17
    alexarchambault commented #2008
  • Apr 19 00:55
    dwickern commented #1815
  • Apr 19 00:50
    dwickern commented #1815
  • Apr 18 22:47
    alexarchambault commented #2012
  • Apr 18 21:10
    ScalaWilliam commented #2012
  • Apr 18 17:41
    alexarchambault commented #1809
  • Apr 18 02:12
    laughedelic commented #1874
  • Apr 16 23:18
    ScalaWilliam commented #2012
  • Apr 15 15:41
    ckipp01 commented #1700
  • Apr 14 07:36
    lefou commented #1815
  • Apr 12 14:18
    david-bouyssie commented #1954
  • Apr 11 19:35
    jsirois opened #2030
  • Apr 09 15:59
    texasbruce commented #1966
  • Apr 08 20:57
    Sciss edited #2029
  • Apr 08 20:43
    Sciss opened #2029
  • Apr 08 17:30
    alexarchambault synchronize #2025
Siddhant Sanyam

Hi, I'm trying to use a local maven repo. When I do coursier fetch scalafmt it fails with Caused by: coursier.install.AppArtifacts$ScalaDependenciesNotFound: Can't find a scala version suffix for org.scalameta::scalafmt-cli:latest.release (likely a non existing module or version)

However when I write the exact version number (after consulting the internet on whatever the latest version, couriser succeeds):

[siddhant@localhost ~] coursier fetch org.scalameta:scalafmt-cli_2.13:2.7.5

Does anyone have ideas as to what might be going on or how do I debug this?

I tried coursier fetch org.scalameta::scalafmt-cli:2.7.5 but that doesn't work either (notice the ::)
Eric K Richardson
I was trying to see if I could make some changes using this as a guide. If I look at the script it looks like it calls main in Coursier but if I put some System.err.println in there I see nothing so I am thinking I am missing something.
Emily Chen
Hi, I'm using Homebrew 3.0.0 and tried brew install coursier/formulas/coursier and brew tap coursier/formulas. Each time, I get these errors:
Error: Invalid formula: /usr/local/Homebrew/Library/Taps/coursier/homebrew-formulas/coursier.rb
coursier: Unsupported special dependency :java
Error: Cannot tap coursier/formulas: invalid syntax in tap!
Siddhant Sanyam
What's the difference between bootstrap --standalone and bootstrap --assembly ?
Przemek Pokrywka

Hi @lolgab

Does coursier need special treatment to update GraalVM to 21.0.0 ? If so, is it tracked somewhere?

Coursier uses a JSON file with an index of JVMs from Jabba project. Version 21.0 of GraalVM was only recently added there. For some reason Coursier doesn't pick this up automatically, but if you pass an additional option, the new GraalVM can be used. The option is

--jvm-index https://raw.githubusercontent.com/shyiko/jabba/master/index.json

Lorenzo Gabriele
@przemek-pokrywka Thank you very much :pray:
Hi guys
anybody knows how to get coursierDependencyTree by specific scope/s?
i can see support when i run sbt test:coursierDependencyTree but it is not working the same for
just for test/compile..
any idea where i can find documentation about this?
Mark T. Kennedy
is there a way to ask coursier to tell me what could be updated without actually updating anything?
is this forum even alive?:D
Przemek Pokrywka
@StinkyLord semi-alive. I may be wrong but Coursier doesn't support the concept of scopes at the moment I think.
it's weird because this sbt test:coursierDependencyTree syntax work fine.. and i checked the source code it has support for scopes.. i wonder why its not official in the docs
hello, is there a way to make thin bootstraps not point to maven central? or should I build standalone bootstraps?
2 replies
Justin Kaeser
Can I use the API to resolve hashes and signatures besides just the artifacts and classifiers? i.e. the whole repo
7 replies

Can anyone see why this might be giving me the below errors?

./coursier --help --no-default -r "https://repo.corp.com/repository/maven-public/"

It appears to be ignoring the command line args?

Error while downloading https://repo1.maven.org/maven2/com/github/alexarchambault/case-app_2.12/2.0.0-M9/case-app_2.12-2.0.0-M9.jar: Connection reset, ignoring it
Error while downloading https://repo1.maven.org/maven2/com/github/alexarchambault/argonaut-shapeless_6.2_2.12/1.2.0-M11/argonaut-shapeless_6.2_2.12-1.2.0-M11.jar: Connection reset, ignoring it
Error while downloading https://repo1.maven.org/maven2/com/github/alexarchambault/case-app-util_2.12/2.0.0-M9/case-app-util_2.12-2.0.0-M9.jar: Connection reset, ignoring it
Error while downloading https://repo1.maven.org/maven2/com/chuusai/shapeless_2.12/2.3.3/shapeless_2.12-2.3.3.jar: Connection reset, ignoring it
Error while downloading https://repo1.maven.org/maven2/com/github/alexarchambault/case-app-annotations_2.12/2.0.0-M9/case-app-annotations_2.12-2.0.0-M9.jar: Connection reset, ignoring it
5 replies
Justin Kaeser
Given a path to an artifact, is there a simple way to get the path to the repo subdirectory? E.g. I have the downloaded /Users/jast/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/jetbrains/scala/scala-compiler-indices-protocol_2.13/1.0.13/scala-compiler-indices-protocol_2.13-1.0.13-javadoc.jar and want the /Users/jast/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/ and org/jetbrains/scala/scala-compiler-indices-protocol_2.13/1.0.13/scala-compiler-indices-protocol_2.13-1.0.13-javadoc.jar portions separately?
4 replies
Justin Kaeser
how do I write an sbt plugin dependency in the API or command line?
cs resolve org.jetbrains.scala:sbt-structure-extractor_2.10_0.13:2021.1.1 yields an error
3 replies
Justin Kaeser
Another problem! when I add .addClassifiers(Classifier.javadoc, Classifier.sources) to a Fetch, it will fetch only the classifiers, but not the primary jars. why is that?
3 replies
Eric K Richardson
@alexarchambault I asked a question about a dozen posts back - any hints
2 replies
Yevgen Nerush

Hi, seems like Coursier cannot resolve the latest version of the netty-transport-native-epoll library for Mac and Linux:

When I add "io.netty" % "netty-transport-native-epoll" % "4.1.60.Final” dependency to the build, Coursier fails retrieveing the artifact with the following error:

 Caused by: lmcoursier.internal.shaded.coursier.cache.ArtifactError$NotFound: not found: https://repo1.maven.org/maven2/io/netty/netty-transport-native-epoll/4.1.60.Final/netty-transport-native-epoll-4.1.60.Final-linux-aarch64.jar
[error]     at lmcoursier.internal.shaded.coursier.cache.FileCache.$anonfun$download$12(FileCache.scala:244)
[error]     at scala.concurrent.Future$.$anonfun$apply$1(Future.scala:659)
[error]     at scala.util.Success.$anonfun$map$1(Try.scala:255)
[error]     at scala.util.Success.map(Try.scala:213)
[error]     at scala.concurrent.Future.$anonfun$map$1(Future.scala:292)
[error]     at scala.concurrent.impl.Promise.liftedTree1$1(Promise.scala:33)
[error]     at scala.concurrent.impl.Promise.$anonfun$transform$1(Promise.scala:33)
[error]     at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:64)
[error]     at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
[error]     at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
[error]     at java.base/java.lang.Thread.run(Thread.java:834)
[error] (update) lmcoursier.internal.shaded.coursier.error.FetchError$DownloadingArtifacts: Error fetching artifacts:
[error] https://repo1.maven.org/maven2/io/netty/netty-transport-native-epoll/4.1.60.Final/netty-transport-native-epoll-4.1.60.Final-linux-aarch64.jar: not found: https://repo1.maven.org/maven2/io/netty/netty-transport-native-epoll/4.1.60.Final/netty-transport-native-epoll-4.1.60.Final-linux-aarch64.jar

Cause: coursier tries to download the artifact with linux-aarch64 prefix, while the actual prefix is linux-aarch_64

Is there any way to configure the correct prefix for transitive dependency?

Adrishyantee Maiti
Screenshot from 2021-03-27 13-56-31.png
1 reply
Can some one help me with this issue highlighted. It says: rror while fetching artifact with coursier: " + exec_result.stderr
@maven//:javax_inject_javax_inject in repository @ maven which failed to fetch. no such package '@ maven//'
Hanns Holger Rutz

Hi there. I want to implement an --offline mode for my application where I constrain coursier to not look up anything on the network, but only locally. For example, in Versions and Resolve. If I print the default repositories, I get

IvyRepository(Pattern(List(Const(file:/home/hhrutz/.ivy2/local/), Var(organisation), Const(/), Var(module), Const(/), Opt(List(Const(scala_), Var(scalaVersion), Const(/))), Opt(List(Const(sbt_), Var(sbtVersion), Const(/))), Var(revision), Const(/), Var(type), Const(s/), Var(artifact), Opt(List(Const(-), Var(classifier))), Const(.), Var(ext))), None, None, true, true, true, true, None, true)
MavenRepository(https://repo1.maven.org/maven2, None, None, true, true)

and if I add withRepositories(Nil), coursier no longer includes Maven Central, but unfortunately the local location is also wiped. Is there a shortcut, for getting that location? Like (hypothetically)

withRespositories(Repositories.local :: Nil)


3 replies
Ok, found it
val repos = if (offline) LocalRepositories.ivy2Local :: Nil else Resolve.defaultRepositories
3 replies
Hanns Holger Rutz
How can I remove the repository information from cache and artifacts? Like instead of ~/.local/share/mellite/coursier/https/repo1.maven.org/maven2/org/artifact, I want coursier to use ~/.local/share/mellite/coursier/org/artifact instead. Is that possible?
Hanns Holger Rutz
How can I turn a FileCache into a Repository? Like I'm fetching artifacts into a custom directory ~/.local/share/mellite/coursier/, how can I make a Repository from that location so that Versions can report which versions have been downloaded?
4 replies
Hanns Holger Rutz
Can I run Versions and get the corresponding .pom files of each version? I can see that they are cached as part of the action. But is there a way to quickly access those poms? I need to read meta-data associated with each version.
10 replies
Hanns Holger Rutz
btw I had trouble importing the project to IntelliJ - the not found: value sbtCoursierVersion error mentioned here occurs. I didn't bother to try to instruct IntelliJ to use different ./sbt, but adding something like def sbtCoursierVersion = "1.2.3" to build.sbt made the problem go away apparently. Might be worth looking into fixing for "standard sbt".
I'm working on a desktop application launcher, using Coursier as a library. Works great so far.
1 reply
Hanns Holger Rutz

Here is a solution for obtaining the pom file that works with maven repositories - I basically peeked into MavenRepository:

      val cacheArt  = cache.FileCache[Task](cfg.artDir)

      val appDepPOM = appDep.withTransitive(false)
      val resolvePOM = Resolve(cacheResolve).addDependencies(appDepPOM).withRepositories(repos)
      resolvePOM.future().foreach { resolution =>
        println("---- RESOLVED ARTIFACTS ----")
        resolution.artifacts().foreach { a =>
          println(s"url = ${a.url}") // ; extra = ${a.extra}")
        val artifacts = Artifacts(cacheArt).withResolution(resolution).addTransformArtifacts { sq =>
          sq.map { case (dependency, _ /*pub*/, art0) =>
            // cf. MavenRepository - metadataArtifact
            val metadataPub = Publication(dependency.module.name.value, Type.pom, Extension.pom, Classifier.empty)
            val metadataURL = {
              val u = art0.url
              assert (u.endsWith(".jar"))
              s"${u.substring(0, u.length - 4)}.${metadataPub.ext.value}"
            val metadataArtifact  =
                changing = false, // XXX TODO what is this?,
                optional = true,
                authentication = art0.authentication

            (dependency, metadataPub, metadataArtifact)
        val fetch = new Fetch(resolvePOM, artifacts, None)
        fetch.futureResult().foreach { res =>
          println("---- FETCHED ARTIFACTS ----")
          res.artifacts.foreach { case (_, f) =>
url = https://repo1.maven.org/maven2/de/sciss/mellite-app_2.13/2.48.0/mellite-app_2.13-2.48.0.jar

is there a public API to achieve this? Also, this fails for local ivy repository, because the .pom is in a different directory. How do I get the Repository belonging to each artifact in a Resolution?

4 replies
Guillaume Galy
I recently tried using Coursier's cs tool to setup my Scala dev env (JDK, SBT, etc.), but I found an issue when installing SBT this way. I have a situation where SBT gets executed with the -batch flag; this flag is correctly recognized by SBT installed via Homebrew, but not by SBT installed via Coursier.
  • I think the difference is because the sbt command installed by cs is actually from coursier/sbt-runner while the one installed by Homebrew probably comes from sbt/sbt-launcher-package; does that sound right?
  • if so, should that be considered a bug in sbt-runner?
    (I have to say that it's quite confusing that the same option might be either accepted or rejected depending on how you install SBT... 😅)
5 replies
Is this supposed to work? cs launch scala3-compiler:3.0.0-RC1
2 replies
Hi, how can I do the equivalent of cs launch from code, capturing stdout and stderr?
1 reply
Chris Kipp
I'm having a hard time understanding why this doesn't work
cs complete -r sonatype:snapshots org.scalameta:metals_2.12:
4 replies
this still just prints out all of the Metals stable versions and doesn't capture what I'd expect it to from here: https://oss.sonatype.org/content/repositories/snapshots/org/scalameta/metals_2.12/maven-metadata.xml
I believe I even asked this before, but I've never successfully been able to list out the actual snapshot versions of Metals that exist here, are able to be pulled, but never show up in complete
any idea how to see these or what I'm doing wrong here?
Can anyone see anything I'm doing obviously wrong here?
simon@Simons-Mac-mini formula-example % coursier launch ammonite
Welcome to the Ammonite Repl 2.3.8-56-2be2b739 (Scala 2.13.5 Java 15.0.2)
@ val s = "1.0" 
scala.reflect.internal.MissingRequirementError: object java.lang.Object in compiler mirror not found.
9 replies
pray tell - is there a way to print each and every http request coursier issues from inside sbt (preferrable 1.4.9, i have some other issue with 1.5.0 i don't want to deal with right now)?
i have interesting issues with a locally hosted artifactory which gives me quite unexpected 403 forbidden responses, and i need more input to think about.
2 replies
another question: am i right in guessing that OkHttpDownload is the one used in sbt by default, and it does send basic authentication headers right from the beginning, without waiting for a status 401 first? if that's the case, it would be worth a comment in sbt/sbt#5556
2 replies

Hello Folks, I am currently migrating a project from sbt 1.1 to sbt 1.4, and upon compilation, I get this issue.

[error] Modules were resolved with conflicting cross-version suffixes in ProjectRef(uri("file:/home/parthshukla/IdeaProjects/project/"), "api"):
[error]    com.typesafe.akka:akka-actor _2.12, _2.11
[error]    com.typesafe.akka:akka-protobuf _2.12, _2.11
[error]    org.scala-lang.modules:scala-java8-compat _2.12, _2.11
[error]    com.typesafe.akka:akka-slf4j _2.12, _2.11
[error] stack trace is suppressed; run last api / update for the full output
[error] (api / update) Conflicting cross-version suffixes in: com.typesafe.akka:akka-actor, com.typesafe.akka:akka-protobuf, org.scala-lang.modules:scala-java8-compat, com.typesafe.akka:akka-slf4j
[error] (coreLib / Compile / compileIncremental) javac returned non-zero exit code
[error] Total time: 24 s, completed Apr 15, 2021, 10:24:20 PM

This is how the dependencies in my build.sbt are declared

libraryDependencies ++= Seq(
    "de.organisation" % "module-test" % organisationVersion % Test excludeAll(
      ExclusionRule("junit", "junit"),
      ExclusionRule(organization = "com.typesafe.akka"),
      ExclusionRule(organization = "org.scala-lang.modules"),
      ExclusionRule(organization = "org.jboss.spec.javax.ws.rs"),
      ExclusionRule(organization = "org.jboss.spec.javax.servlet"),
      ExclusionRule(organization = "org.jboss.spec.javax.annotation"),
      ExclusionRule(organization = "javax.activation"),
      ExclusionRule(organization = "net.jcip"),
      ExclusionRule(organization = "org.jboss.logging"),
      ExclusionRule(organization = "com.sun.xml.bind"),
      ExclusionRule(organization = "com.sun.mail"),
      ExclusionRule(organization = "org.apache.james")
    "org.easytesting" % "fest-assert" % "1.4" % Test,
    "junit" % "junit" % "4.12" % Test,
    "pl.pragmatists" % "JUnitParams" % "1.1.1" % Test,
    "org.mockito" % "mockito-all" % "1.9.5" % Test,
    "nl.jqno.equalsverifier" % "equalsverifier" % "3.1.7" % Test

When I disable coursier, the project compiles successfully and therefore I believe the issue is coming from a coursier incompatability. Can someone please help? I've been beating my head against this for a while now

Rob Norris
It seems that the Coursier launcher for sbt doesn't work with 1.5.0 … it's not clear to me who is in charge of keeping it updated, or really whether it should exist at all given the complexity of the standard launcher script. It seems to me that resolving this is a blocker for Coursier becoming the standard way to manage Scala tooling. Maybe this would be a good Scala Center project, I don't know.
Does anyone have any better-formed thoughts about this?
@tpolecat try cs uninstall sbt followed by sbt install sbt. It worked for someone here.
Rob Norris
Sorry, I meant csbt
Ali Salim Rashid

Hi all. Anyone know if it is possible to get the version number of an app that would be resolved by cs install or cs bootstrap?

For example, for apps declared with latest.stable version in a channel such as 'scala' from the 'core' channel, is there any way to get the version that would be fetched by cs bootstrap scala?

Vlad Patryshev
Hope I'm not asking a dumb question here.
I have some code that I publish locally via sbt publishLocal; seems like it only stores it to .ivy2, but we use Coursier, so am I out of luck? Or there is a magic trick to either make Coursier view what's in .ivy2?
Vlad Patryshev
Oh, my previous message... just ignore it; I don't see how to remove it.