-
-
Notifications
You must be signed in to change notification settings - Fork 259
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for using Maven BOMs with Coursier
Coursier now support using Maven BOMs when resolving. This upgrades Coursier to 2.1.23 and enables using BOMs leveraging the existing `boms` attribute on `maven_install`. Note that Coursier has a slight performance regression since adding support for BOMs, see coursier/coursier#3190. Fixes #1289
- Loading branch information
Showing
8 changed files
with
44 additions
and
893 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,7 +39,7 @@ def maven_install( | |
repositories: A list of Maven repository URLs, specified in lookup order. | ||
Supports URLs with HTTP Basic Authentication, e.g. "https://username:[email protected]". | ||
boms: A list of Maven artifact coordinates in the form of `group:artifact:version` which refer to Maven BOMs. The `coursier` `resolver` does not support using BOMs. | ||
boms: A list of Maven artifact coordinates in the form of `group:artifact:version` which refer to Maven BOMs. | ||
artifacts: A list of Maven artifact coordinates in the form of `group:artifact:version`. | ||
resolver: Which resolver to use. One of `coursier`, or `maven`. | ||
fail_on_missing_checksum: fail the fetch if checksum attributes are not present. | ||
|
@@ -81,9 +81,6 @@ def maven_install( | |
ignore_empty_files: Treat jars that are empty as if they were not found. | ||
additional_coursier_options: Additional options that will be passed to coursier. | ||
""" | ||
if boms and resolver == "coursier": | ||
fail("The coursier resolver does not support resolving Maven BOMs. Please use another resolver.") | ||
|
||
if resolver != "coursier" and not maven_install_json: | ||
fail("Only the coursier resolver supports build time resolution. Please set `maven_install_json`. An empty file will work.") | ||
|
||
|
@@ -126,6 +123,7 @@ def maven_install( | |
pinned_repo_name = None if maven_install_json == None else name, | ||
repositories = repositories_json_strings, | ||
artifacts = artifacts_json_strings, | ||
boms = boms_json_strings, | ||
fail_on_missing_checksum = fail_on_missing_checksum, | ||
fetch_sources = fetch_sources, | ||
fetch_javadoc = fetch_javadoc, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
_COURSIER_CLI_VERSION = "v2.1.8" | ||
_COURSIER_CLI_VERSION = "v2.1.23" | ||
|
||
COURSIER_CLI_HTTP_FILE_NAME = ("coursier_cli_" + _COURSIER_CLI_VERSION).replace(".", "_").replace("-", "_") | ||
COURSIER_CLI_GITHUB_ASSET_URL = "https://github.com/coursier/coursier/releases/download/{COURSIER_CLI_VERSION}/coursier.jar".format(COURSIER_CLI_VERSION = _COURSIER_CLI_VERSION) | ||
|
||
# Run 'bazel run //:mirror_coursier' to upload a copy of the jar to the Bazel mirror. | ||
COURSIER_CLI_BAZEL_MIRROR_URL = "https://mirror.bazel.build/coursier_cli/" + COURSIER_CLI_HTTP_FILE_NAME + ".jar" | ||
COURSIER_CLI_SHA256 = "2b78bfdd3ef13fd1f42f158de0f029d7cbb1f4f652d51773445cf2b6f7918a87" | ||
COURSIER_CLI_SHA256 = "520c0c3dea3e5d075542e874d33e4cfac5a9bf3f461a3d4a9e6fba4032f7f007" |
Oops, something went wrong.