coursier
A dependency resolver for the Maven ecosystem.
Backend: ``
Config section: [coursier]
Basic options
None
Advanced options
known_versions
--coursier-known-versions="['<str>', '<str>', ...]"
PANTS_COURSIER_KNOWN_VERSIONS
[coursier]
known_versions = [
'<str>',
'<str>',
...,
]
[ "v2.0.13|linux_arm64 |8d428bede2d9d0e48ffad8360d49de48bd0c2c3b0e54e82e3a7665019b65e4d0|58622664", "v2.0.13|linux_x86_64|1ae089789cc4b0a4d296d6852b760d7f8bf72805267a6b7571e99b681d5e13b4|59652208", "v2.0.13|macos_arm64 |d74b8fe4ffc2f4e9011d7151722fc8b5ffca8a72b3bc4188c61df3326228c4ef|57625024", "v2.0.13|macos_x86_64|d74b8fe4ffc2f4e9011d7151722fc8b5ffca8a72b3bc4188c61df3326228c4ef|57625024" ]
Known versions to verify downloads against.
Each element is a pipe-separated string of version|platform|sha256|length
, where:
version
is the version stringplatform
is one of [linux_arm64,linux_x86_64,macos_arm64,macos_x86_64],sha256
is the 64-character hex representation of the expected sha256 digest of the download file, as emitted byshasum -a 256
length
is the expected length of the download file in bytes, as emmitted bywc -c
E.g., 3.1.2|macos_x86_64|6d0f18cd84b918c7b3edd0203e75569e0c7caecb1367bbbe409b44e28514f5be|42813
.
Values are space-stripped, so pipes can be indented for readability if necessary.
url_platform_mapping
--coursier-url-platform-mapping="{'key1': val1, 'key2': val2, ...}"
PANTS_COURSIER_URL_PLATFORM_MAPPING
[coursier.url_platform_mapping]
key1 = val1
key2 = val2
...
{ "linux_arm64": "aarch64-pc-linux", "linux_x86_64": "x86_64-pc-linux", "macos_arm64": "x86_64-apple-darwin", "macos_x86_64": "x86_64-apple-darwin" }
A dictionary mapping platforms to strings to be used when generating the URL to download the tool.
In --url-template, anytime the {platform}
string is used, Pants will determine the current platform, and substitute {platform}
with the respective value from your dictionary.
For example, if you define {"macos_x86_64": "apple-darwin", "linux_x86_64": "unknown-linux"}, and run Pants on Linux with an intel architecture, then
{platform}` will be substituted in the --url-template option with unknown-linux.
url_template
--coursier-url-template=<str>
PANTS_COURSIER_URL_TEMPLATE
[coursier]
url_template = <str>
https://github.com/coursier/coursier/releases/download/{version}/cs-{platform}
URL to download the tool, either as a single binary file or a compressed file (e.g. zip file). You can change this to point to your own hosted file, e.g. to work with proxies or for access via the filesystem through a file:$abspath
URL (e.g. file:/this/is/absolute
, possibly by templating the buildroot in a config file).
Use {version}
to have the value from --version substituted, and {platform}
to have a value from --url-platform-mapping substituted in, depending on the current platform. For example, https://github.com/.../protoc-{version}-{platform}.zip.
use_unsupported_version
--coursier-use-unsupported-version=<UnsupportedVersionUsage>
PANTS_COURSIER_USE_UNSUPPORTED_VERSION
[coursier]
use_unsupported_version = <UnsupportedVersionUsage>
error, warning
default:
error
What action to take in case the requested version of coursier is not supported.
Supported coursier versions: unspecified
version
--coursier-version=<str>
PANTS_COURSIER_VERSION
[coursier]
version = <str>
v2.0.13
Use this version of coursier.
Deprecated options
None
Related subsystems
None