Skip to content

Conversation

alexarchambault
Copy link
Member

@alexarchambault alexarchambault commented Nov 5, 2024

This allows coursier users to pass coordinates of a "BOM" to be used during resolution. The BOM is basically a POM file containing versions (and exclusions too) of dependencies, meant to override versions (and for exclusions, be added) pulled during resolutions.

From the API, users can add BOM coordinates like

Resolve()
  .addBomDependencies(dep"io.quarkus:quarkus-bom:3.16.2")
// or
Fetch()
  .addBomDependencies(dep"io.quarkus:quarkus-bom:3.16.2")

From the CLI, users can use the --bom option, like

$ cs resolve --bom io.quarkus:quarkus-bom:3.16.2 org:name:version

Both from the API and the CLI, root dependencies can have _ as a version. In that case, the version is read from the BOM:

$ cs resolve com.google.code.gson:gson:_ --bom io.quarkus:quarkus-bom:3.16.2

@alexarchambault

This comment was marked as outdated.

@alexarchambault alexarchambault marked this pull request as ready for review November 7, 2024 17:38
@alexarchambault alexarchambault merged commit 126c8f2 into coursier:main Nov 7, 2024
23 checks passed
@alexarchambault alexarchambault deleted the bom-option branch November 7, 2024 18:17
tgodzik added a commit to scalameta/metals that referenced this pull request Nov 18, 2024
@tgodzik
Copy link
Collaborator

tgodzik commented Nov 18, 2024

Btw. @alexarchambault fetching org.jboss.xnio:xnio-nio:3.8.16.Final now brings in jboss-logging-3.4.3 instead of previous jboss-logging-3.3.1, might be related to the change but I am not sure if that is expected. Doesn't change anything for metals, but wanted to mention it.

@tgodzik
Copy link
Collaborator

tgodzik commented Nov 18, 2024

Context scalameta/metals#6935

@alexarchambault
Copy link
Member Author

@tgodzik Thanks for reporting that. The change looks correct. org.jboss.xnio:xnio-nio:3.8.16.Final has org.jboss.xnio:xnio-all:3.8.16.Final as parent, which has org.jboss.logging:jboss-logging:3.4.3.Final in its dependency management section. This overrides the org.jboss.logging:jboss-logging versions pulled by org.jboss.xnio:xnio-nio:3.8.16.Final transitive dependencies, with this PR's changes. So 3.4.3.Final is the expected version now.

@tgodzik
Copy link
Collaborator

tgodzik commented Nov 19, 2024

Thanks for confirming and the context!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants