Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
  • 11:07
    keynmol commented #2335
  • 11:02
    bishabosha commented #2335
  • Jan 26 19:42
    steffenlaursen opened #2345
  • Jan 26 15:01

    alexarchambault on gh-pages

    Update website (compare)

  • Jan 26 14:20

    alexarchambault on master

    Update GraalVM to 22.0.0 (#2344) (compare)

  • Jan 26 14:20
    alexarchambault closed #2344
  • Jan 26 14:09
    alexarchambault ready_for_review #2344
  • Jan 26 14:01
    alexarchambault opened #2344
  • Jan 26 10:52
    ckipp01 opened #2343
  • Jan 26 09:44
    dos65 opened #2342
  • Jan 25 09:18
    alonsodomin synchronize #2317
  • Jan 24 23:31

    alexarchambault on v2.1.0-M2-19-g5a34ba7c1

    debug update-website job in CI (compare)

  • Jan 24 23:26

    alexarchambault on v2.1.0-M2-19-g5a34ba7c1

    Debug website update debug update-website job in CI (compare)

  • Jan 24 15:28
    julienrf commented #1957
  • Jan 24 13:45

    alexarchambault on gh-pages

    Update website (compare)

  • Jan 24 11:26

    alexarchambault on v2.1.0-M2-19-g5a34ba7c1


  • Jan 24 10:54
    julienrf commented #2295
  • Jan 24 10:43
    sideeffffect edited #2057
  • Jan 24 10:43
    sideeffffect edited #2057
  • Jan 24 08:35
    ashwinbhaskar opened #2341
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
Simon Parten

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?
Simon Parten
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.

Hi all. Question: when I try to install coursier in a new WSL2 instance of Ubuntu 20.04, I get an error that Java is not found:

$ curl -L https:/git.io/coursier-cli -o cs
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100   135    0   135    0     0    424      0 --:--:-- --:--:-- --:--:--  1646
100 42577  100 42577    0     0  85495      0 --:--:-- --:--:-- --:--:-- 85495
$ chmod +x cs
$ ./cs install cs
./cs: 25: exec: java: not found

Do I have the wrong link? Or is something else going on here?

Roberto Tyley
Hello all, I'm curious as to how 'complete' (https://get-coursier.io/docs/cli-overview.html#complete) does what it does, because it seems incredible (how does it work out all the artifacts for a group?! Where is the Maven data for that!?). I was trying to dig through the code (looking at eg https://github.com/coursier/coursier/blob/382250d4f26b4728400a0546088e27ca0f129e8b/modules/core/shared/src/main/scala/coursier/maven/MavenComplete.scala#L16 ) but was slightly hamstrung because IntelliJ fails to import the sbt project (I don't know if there's any special guidance on etting IntelliJ to do this, couldn't see any in https://get-coursier.io/docs/dev-contributing ).
Roberto Tyley
Oh wow - to answer my own question about "how does it work out all the artifacts for a group?" (specifically I was interested in Maven Central) - Coursier parses it (https://github.com/coursier/coursier/blob/382250d4f2/modules/util/jvm/src/main/scala/coursier/util/WebPageCompatibility.scala#L9-L14) from raw HTML directory listings, like eg https://repo1.maven.org/maven2/org/typelevel/ . Those HTML directory listings were the best source of that information I'd been able to find (possibly the only source, apart from https://search.maven.org/solrsearch/select) but I was still a bit surprised that they are the best source of that information. Those HTML pages haven't changed format for a long time, but I'm assuming they aren't a formal API, or are they? I wonder if aether/Maven Artifact Resolver Provider do this. I mean, this approach works fantastically well, I'm just slightly unnerved.
Chris Kipp
If I'm not mistaken the html listing page is actually a backup that coursier uses if it's unable to locate the maven-metadata.xml file for a project
most of the time I believe the full version information is simply parsed from the maven-metadata file both for the complete and resolve functionality
Roberto Tyley
That makes sense! I guess it can definitely refer to maven-metadata.xml when an artifact coordinate is specified (eg org.typelevel:cats-core_2.13) which most be the most common kind of question it faces, but there's no usable maven-metadata.xml at the group level (eg https://repo1.maven.org/maven2/org/typelevel/maven-metadata.xml doesn't exist) - so if you want to find all the artifacts that live under a group id (eg org.typelevel) then there's no choice but to parse the HTML out of the directory listing page. It's a much rarer question though - I'm currently interested in it, but I guess it's not going to be an essential part of eg resolving all the dependencies of build!
Bjorn Regnell
can cs show me which versions are installed of for example scala and scala3-repl ?
cs list just gives me the names not the versions...