Understand Bzlmod module dependency layering
masterThe rules_jvm_external Bzlmod extension collects artifacts from all tags with the same name attribute (defaulting to maven) across different Bzlmod modules and resolves them together.
Key Behaviors:
- Namespace Contributions: If multiple modules contribute to the same
mavenrepository, a message will inform you which modules are involved. You can suppress this warning by adding the contributing modules to theknown_contributing_modulesattribute of theinstalltag. - Version Conflicts: If different modules request different versions of the same artifact, the resolver uses the highest version found in the root and sub-modules.
- Resolution Warnings: If the root module's version is not the highest, you will see a warning during repinning. To fix this, either update the version in your root
MODULE.bazelto the highest version or setforce_version = Truein the root module.