Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
  • Jun 24 21:57
    mtk opened #2452
  • Jun 24 00:13
    quelgar commented #2450
  • Jun 22 13:55
    bishabosha commented #2451
  • Jun 22 13:23
    bishabosha commented #2451
  • Jun 22 13:22
    bishabosha commented #2451
  • Jun 22 03:02
    armanbilge commented #2178
  • Jun 20 22:51
    smarter commented #2408
  • Jun 20 22:51
    smarter closed #2408
  • Jun 20 13:21
    bishabosha edited #2451
  • Jun 20 13:21
    bishabosha edited #2451
  • Jun 20 13:20
    bishabosha opened #2451
  • Jun 20 04:21
    dzx-dzx opened #2450
  • Jun 19 23:41
    nafg commented #2408
  • Jun 16 20:03
    marktsuchida opened #2449
  • Jun 16 16:49

    alexarchambault on gh-pages

    Update website (compare)

  • Jun 16 16:43

    alexarchambault on gh-pages

    Update website (compare)

  • Jun 16 16:41

    alexarchambault on gh-pages

    Update website (compare)

  • Jun 16 16:08
    alexarchambault closed #2418
  • Jun 16 16:08
    alexarchambault commented #2418
  • Jun 16 16:06

    alexarchambault on v2.1.0-M6-28-gbad85693f


Florian Schmaus
@kevinsjoberg does https://get-coursier.io/docs/cli-java help?
I don't think there is any reason for coursier being able to manage JVM installs (alongside JVM-based app installs) that requires one to push hardcoded paths in .bash_profile
all that is needed is ~/.local/share/coursier/bin in your PATH
Kevin Sjöberg

@Flowdalic When I run cs setup it asks to put things into .profile and .bash_profile. Specifically the following:

# >>> JVM installed by coursier >>>
export JAVA_HOME="/Users/kevin/Library/Caches/Coursier/arc/https/github.com/adoptium/temurin18-binaries/releases/download/jdk-18%252B36/OpenJDK18U-jdk_x64_mac_hotspot_18_36.tar.gz/jdk-18+36/Contents/Home"
# <<< JVM installed by coursier <<<

# >>> coursier install directory >>>
export PATH="$PATH:/Users/kevin/Library/Application Support/Coursier/bin"
# <<< coursier install directory <<<

Adding /Users/kevin/Library/Application Support/Coursier/bin to my PATH is fine, but the JAVA_HOME is explicit. If I'm supposed to use Coursier to manage different versions of the JVM, I don't see how this fits into that.

Florian Schmaus
tbh, I wouldn't want to mess coursier with the JAVA_HOME environment variable, and I did not set that
so one way to manage select the JVM that is used for a particular app is cs java --jvm 11 --env
I did not find a way for the user to manage the default (user) JVM. that is typically done by having JAVA_HOME point to a path which is a symlink to the actual JVM the user wants
For example, that is how Gentoo lets its user select (and override) the system JVM setting
Having JAVA_HOME not point to a symlink feels wrong to me :)
But really, I am probably as new as you to coursier, so if someone else wants to shed some light into this, then please step forward :)
Kevin Sjöberg
Yeah, same here. I removed it now, as it feels wrong to hardcode that value. But what's the purpose of cs setup. Can I set up multiple JVMs and apps? It's all a tad confusing to me to be honest.
Alright, if I removed JAVA_HOME that coursier added to my .bash_profile I can't use the apps anymore.
Unless I set JAVA_HOME to the output of cs java-home again.
As an example, running scala now spits out The operation couldn’t be completed. Unable to locate a Java Runtime. Please visit http://www.java.com for information on installing Java..
Florian Schmaus
@kevinsjoberg it appears you need to set JAVA_HOME to something sensible then. not sure about the internals of coursier, but some apps are just happy with java in PATH
note that I too have JAVA_HOME set, just not with a value provided by couriser
Kevin Sjöberg
I'm so confused. I understand the purpose of JAVA_HOME, but I do have a JVM installation outside of Coursier. It was needed to actually run Coursier itself. Then Coursier installs another JVM that it manages.
I could of course use direnv and create a .envrc file that sets things up using cs java --env but I'm still confused how things is intended to work.
How do I choose what JVM to use? Can I list installed JVMs (I've only found cs list that lists installed apps)?
Eric K Richardson
I used sdkman to install Java 8, 11, and 17 zulu which are ARM only and it allows you do switch via
sdk list java
sdk install java 17.0.2-zulu
Eric K Richardson
If you install it asks if you want to make it default.
sdk use java 17.0.3-zulu
for this terminal only
daniel sieradski

Hello, I'm totally new to Scala so please forgive me in advance if I'm slow on the uptake here... I installed coursier via Homebrew. Then I added a channel from Maven with cs channel --add https://repo1.maven.org/maven2/io/gatling/highcharts/gatling-charts-highcharts-bundle/maven-metadata.xml. It showed the channel as properly installing. So far so good. But then when I try to install or resolve the package, I get:

cs resolve gatling-charts-highcharts-bundle      
Exception in thread "main" java.lang.Exception: java.lang.Exception: Error decoding /Users/daniel/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/io/gatling/highcharts/gatling-charts-highcharts-bundle/maven-metadata.xml (https://repo1.maven.org/maven2/io/gatling/highcharts/gatling-charts-highcharts-bundle/maven-metadata.xml): Unexpected content found: <?xml version="1.0" encoding="UTF-8"?>

Any ideas what I'm doing wrong here? Thanks.

daniel sieradski
Ok, I figured out what I was doing wrong insofar as how to setup a channel. But now I can't get the JSON file to work. What am I doing wrong?
    "repositories": ["central"],
    "dependencies": ["io.gatling.highcharts::gatling-charts-highcharts-bundle:3.2.1"]
Anyone know how I can get the java-home command to print the path for the linux-musl version of the JDK on Alpine?
How to I tell coursier to stfu and stop looking for sources.jar and javadoc.jar for a library? At least in ivy it only produced a warning.
Iwan Aucamp
Coursier is awesome
it is the tool I always wanted for JVM
Really great job
Damian Reeves
Hi. I posted this discussion some time ago (https://github.com/coursier/coursier/discussions/2404) and was hoping someone could help me figure this out.

My company has a proxy repository which all artifact access is fronted by.
As such in sbt, we use the configuration details mentioned here: https://www.scala-sbt.org/1.x/docs/Proxy-Repositories.html#sbt+Configuration in order to configure sbt to correctly resolve artifacts.

The docs referenced speak to a block like this:

  my-ivy-proxy-releases: http://repo.company.com/ivy-releases/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
  my-maven-proxy-releases: http://repo.company.com/maven-releases/

This works great for sbt, but I am trying to accomplish the same in the coursier CLI (as well as in mill, which I know is outside the scope of this repo).
What would be the raw coursier configuration way to accomplish what sbt does? I'm interested both in how to do this with config files, i.e. using coursier.mirrors, using environment variables and finally using command line options.

What's of particular note is how to configure the ivy pattern in coursier as shown in sbt.

Peng Cheng
How to cs list showing all versions?
Olivier Mélois

Hey folks, I'm trying to download a binary executable from :


unfortunately, the binaries are not listed in the pom file, so setting types/classifiers in coursier dependencies is not helping. Does coursier allow for downloading a file without it being referenced in the pom ?

Olivier Mélois
(above was a user problem, no need to worry)