Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
  • 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
  • Jan 24 02:35

    alexarchambault on gh-pages

    Update website (compare)

  • Jan 24 02:35

    alexarchambault on gh-pages

    Update website (compare)

  • Jan 24 02:26

    alexarchambault on gh-pages

    Update website (compare)

  • Jan 24 02:26

    alexarchambault on gh-pages

    Update website (compare)

  • Jan 24 02:25

    alexarchambault on gh-pages

    Update website (compare)

  • Jan 24 02:25

    alexarchambault on gh-pages

    Update website (compare)

  • Jan 24 02:24

    alexarchambault on gh-pages

    Update website (compare)

  • Jan 24 02:22

    alexarchambault on gh-pages

    Update website (compare)

  • Jan 24 02:21

    alexarchambault on gh-pages

    Update website (compare)

  • Jan 24 02:15

    alexarchambault on gh-pages

    Update website (compare)

Brian P. Holt

Our Nexus instance is fronted by nginx for various reasons, but I was able to get cs complete working using this directive in nginx:

location ~ ^/repository/((?:maven|ivy)-[^/]+)((?:/[^/]+)*)/$ {
  proxy_pass http://nexus:8081/service/rest/repository/browse/$1$2/;

Basically rewriting the requests that Coursier makes to their corresponding endpoints in the Nexus REST API. This feels like a hack but it seems like it’s working so far. (We might find out through more use that it’s missing something or otherwise causes problems… time will tell)

Robert Bates

hi! i'm trying to install scala3 on macOS via homebrew, and when executing:
brew install coursier/formulas/coursier
i keep getting this error:

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!

any idea if this is from a recent update or is there some undocumented missing dep?

on the latest brew commit - 4e6919b73

latest version of bloop is 1.4.9, coursier installs bloop v1.4.8-114-e47368ed, vscode metals extension 1.10.11 requires bloop 1.4.9.

what is the usual turnaround time for coursier to catch up to latest bloop version?

Chris Kipp
coursier should be pulling in the latest, since the coursier/apps bloop.json` looks for the latest release artifact, and it's there
also keep in mind that you can do a bloop exit to shutdown bloop, and then open Metals, and metals will start the version of bloop it has reference to
yes, might have to let metals take care of its ownbloop needs, ftm

ok, appears to be my mistake -- after bloop exit and restarting bloop it attached to a 1.4.9 server -- so bloop about now reports 1.4.9.

i assume it just kept restarting an older server previously.

Tobias Roeser
With the update of from 20.16+73-gddc6d9cc9 to 2.0.16-158-gbdc8669f9 we get the following exception in out CI
  java.lang.NoSuchMethodError: 'com.google.common.collect.ImmutableSet com.google.common.collect.ImmutableSet.copyOf(java.util.Collection)'
It's not directly related to coursier, but probably to it's transitive dependencies
This is a ScalaJS test.
Any ideas?
Also, we get this:
  java.lang.NoClassDefFoundError: Could not initialize class com.google.common.jimfs.Configuration$UnixHolder
Grégory Marti


Trying to migrate my repositories to gitlab i seem to have a problem to download sbt plugins from there.

I tried to configure normal sbt with Http headers, its not working

my project/plugins.sbt file :

import lmcoursier.definitions.Authentication

val auth:Authentication = if (sys.env.contains("CI")) {
} else {
  Authentication(Seq(("Private-Token", sys.env("GITLAB_PRIVATE_TOKEN"))))
resolvers += ("COUCOU" at "https://myrepo/api/v4/groups/mygroup/-/packages/maven")

csrConfiguration ~= (_.addRepositoryAuthentication("COUCOU",auth))
updateClassifiers / csrConfiguration ~= (_.addRepositoryAuthentication("COUCOU",auth))
updateSbtClassifiers / csrConfiguration ~= (_.addRepositoryAuthentication("COUCOU",auth))

addSbtPlugin("myorg"    % "sbt-myplugin"    % "1.2.3")

error : Im forbidden, so probably it doesnt use the authentication (I can successfully curl with the token )

So i tried to use sbt-coursier plugin for this "specific use-case" with sbt-extras (like here https://get-coursier.io/docs/sbt-coursier#sbt-13x) but it doesnt compile, seems there is an issue with coursier version conflict
java.lang.NoSuchMethodError: 'coursier.core.Project lmcoursier.definitions.ToCoursier$.project(lmcoursier.definitions.Project)'

Is there a way to use sbt-coursier plugin instead of coursier used by sbt ?


Boris Capitanu

Is it possible to unify artifact cache locations between Maven and SBT such that we don't end up with multiple copies of the same artifact in the various caches (Maven, Ivy, Coursier)? I have projects built with Maven and SBT and over time the cached artifacts are starting to occupy a non-trivial amount of disk space. "It is what it is" was my philosophy so far, but a cursory inspection shows that there are many duplicates between the artifacts stored at ~/.m2/repository/, ~/.ivy2/cache/, and ~/Library/Caches/Coursier/....

Is it possible to create a setup where Maven and SBT projects look up (and store) cached artifacts in a single location? That includes sbt publishLocal to store the locally-published artifact in the same cached location. I don't care which location it is between the 3 I mentioned...

Tobias Roeser
@borice Possible, yes, advisable, probably not. At least, each tools has different assumption about the mutability of the downloaded artifacts. I think coursier is rather strict. The simplest solution would be IMHO, to derive from MavenRepository and just lookup the JARs in alternative locations before downloading them. That means all metadata is still redundant and under the control of each respective tool, but the actual JARs, which are the large files, and which can be checked for their checksums, are shared in the sense that they will be reused if already present in some other location.
2 replies

Hi just got myself an ARM-based Apple computer and tried installing Java, Scala, sbt, etc. through coursier. It appears to work for Java (adopt-openj9:1.8.0-292) and Scala (2.13.6). But when launching sbt I am presented with the following error:

❯ sbt [info] [launcher] getting org.scala-sbt sbt 1.5.5 (this may take some time)... assertion failed [found_x86_offset]: no instruction entry found for jit breakpoint at arm address 0x10838cbb0 (TranslationCacheJit.cpp:300 handle_jit_breakpoint)

I don't see anything on this on the docs so was hoping someone could help me out with this. I'd prefer to install everything thsough one manager (coursier) and not have to install e.g. sbt through brew. Thanks!

Hi Gitter Guys!
I'm trying to install this command "cs setup --jvm adopt:11" I have some errors. Please help me!
Exception in thread "main" coursier.cache.ArtifactError$DownloadError: download error: Caught javax.net.ssl.SSLHandshakeException (PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target) while downloading https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11%2B28/OpenJDK11-jdk_x64_mac_hotspot_11_28.tar.gz
Eugene Medvediev
Hello, I have a problem with updating bloop to latest version:
I have Ubuntu 20.04 and have installed bloop via coursier. Current version is bloop v1.4.10-8-8d1cbc4f.
I see no errors when I execute command cs update bloop. I even uninstall bloop and install again, but somehow it installs version 1.4.10, even if 1.4.11 is available.
Looks like it uses already downloaded version and only copying it to ~/.local/share/coursier/bin/bloop location.
What is the way to install latest bloop?
Eugene Medvediev

❯ cs install bloop
No new update since 2021-11-02 20:11:03
Wrote bloop

❯ bloop about
bloop v1.4.10-8-8d1cbc4f

but if I follow the link, then latest version is 1.4.11

1 reply
have you tried with: cs update bloop ? @eugenemedvediev
Tomasz Godzik
You also need to stop the server first with bloop ng-stop and then do any other Bloop command

I'm wondering if https://logging.apache.org/log4j/2.x/security.html could affect https://github.com/coursier/sbt-coursier

See that there is log4j as a third-party dependency:

io.get-coursier:lm-coursier_2.12:2.0.9+5-935e59c8+20211213-1307-SNAPSHOT [S]
  +-org.scala-sbt:librarymanagement-ivy_2.12:1.3.4 [S]
    +-org.scala-sbt:librarymanagement-core_2.12:1.3.4 [S]
       +-org.scala-sbt:util-logging_2.12:1.3.3 [S]
       | +-org.apache.logging.log4j:log4j-core:2.11.2
       | | +-org.apache.logging.log4j:log4j-api:2.11.2
Tim Steinbach
Hello. Homebrew just upgraded me to Coursier 2.1.0-M1 yesterday. The one thing that stood out for my use case is coursier/coursier#2188 I can set COURSIER_ARCHIVE_CACHE and then things such as cs setup --jvm adopt:1.11.0-11 will write into that folder. However, the JAVA_HOME ends up looking similar to the following: .coursier.d/https/github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.11%252B9/OpenJDK11U-jdk_x64_mac_hotspot_11.0.11_9.tar.gz/jdk-11.0.11+9/Contents/Home/ Is there currently a way to get a more direct route to JAVA_HOME? What I mean by that is that when I say adopt:1.11.0-11, the actual PATH is fairly unpredictable. I would like to know JAVA_HOME without calling cs java --envif at all possible. Maybe something like $COURSIER_ARCHIVE_CACHE/jvm/$JDK_SHORTNAME would be amazing as a symlink into the directory structure. So I suppose my question here is whether something similar already exists. And if not, I would to contribute such functionality but am having a bit of a hard time finding where exactly these paths would be built. Is modules/jvm/src/main/scala/coursier/jvm/JvmCache.scala a good place to start?

Does Coursier support ssh resolvers?

I have used an ssh resolver in SBT for years and I like it. But I can't make it work in the current environment. The SBT doc is unchanged, but I am getting an error out of coursier.internal.PlatformRepositoryParser:89. I guess I'm not saying Maven or Ivy repo type.

Olivier Mélois
It might be a dumb question : have scalajs bootstraps been considered ?
A. Alonso Dominguez
hi all, wondering if any of the maintainers could take a look at the following PR and give some feedback (or at least trigger the CI build): coursier/coursier#2317

Hey all, I'm having trouble getting coursier to discover new versions of a dependency even when setting coursier_mode and coursier_ttl to the following

export COURSIER_TTL="0s"
export COURSIER_MODE="update-local-changing,offline,missing"

The dependency in question is an sbt plugin and is wildcarding on the patch version like so 1.2.+. I'm hoping that when new patch versions of the dependency are published coursier will automatically discover and download them but as of right now it doesn't seem like that's happening. Also, the maven-metadata.xml file in the local coursier cache does not match the file in the remote repository, the local file seems to be a few versions behind. Wondering if anyone has thoughts on what I can try to make this work the way I'm expecting it to, thanks in advance!

1 reply

I am using the standalone JAR coursier (V 2.1.0 M2) to set up scala .

$  ./coursier install -r https://username:password@artifactory.corp:443/artifactory/r-XXX-virtual scala
  No new update since 2021-11-16 00:52:42
Exception in thread "main" coursier.error.ResolutionError$CantDownloadModule: Error downloading org.scala-lang:scala-compiler:latest.stable
  download error: Caught javax.net.ssl.SSLException (Connection reset) while downloading https://repo1.maven.org/maven2/org/scala-lang/scala-compiler/maven-metadata.xml
        at coursier.Resolve$.$anonfun$validate$1(Resolve.scala:347)
        at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:286)
        at scala.collection.Iterator.foreach(Iterator.scala:943)
        at scala.collection.Iterator.foreach$(Iterator.scala:943)
        at scala.collection.AbstractIterator.foreach(Iterator.scala:1431)
        at scala.collection.IterableLike.foreach(IterableLike.scala:74)
        at scala.collection.IterableLike.foreach$(IterableLike.scala:73)
        at scala.collection.AbstractIterable.foreach(Iterable.scala:56)
        at scala.collection.TraversableLike.map(TraversableLike.scala:286)
        at scala.collection.TraversableLike.map$(TraversableLike.scala:279)
        at scala.collection.AbstractTraversable.map(Traversable.scala:108)
        at coursier.Resolve$.validate(Resolve.scala:345)
        at coursier.Resolve.validate0$1(Resolve.scala:117)
        at coursier.Resolve.$anonfun$ioWithConflicts0$4(Resolve.scala:167)
        at coursier.util.Task$.$anonfun$flatMap$extension$1(Task.scala:14)
        at coursier.util.Task$.$anonfun$flatMap$extension$1$adapted(Task.scala:14)
        at coursier.util.Task$.wrap(Task.scala:82)
        at coursier.util.Task$.$anonfun$flatMap$2(Task.scala:14)
        at scala.concurrent.Future.$anonfun$flatMap$1(Future.scala:307)
        at scala.concurrent.impl.Promise.$anonfun$transformWith$1(Promise.scala:41)
        at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:64)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)

Any idea why the custom repository '-r' is not considered? I am in a enterprise environment and we cannot use repo1.maven.org.

A. Alonso Dominguez

hi all, wondering if any of the maintainers could take a look at the following PR and give some feedback (or at least trigger the CI build): coursier/coursier#2317

giving some visibility to this, if any of the maintainers is around, could this PR be reviewed please?

Mark T. Kennedy
right now metals v0.11.0 wants bloop v1.4.12. but cs (even after a 'cs update') has bloop 1.4.11 installed. a 'cs uninstall bloop' followed by a 'cs install bloop' still downloads 1.4.11. the online doc for a cs install of bloop lists the current version as 1.4.12. i'm confused :-).
Mark T. Kennedy
belay that question. it just needed to be restarted.