Skip to content

Comments

Use a private namespace for the java dependencies#676

Open
shs96c wants to merge 1 commit intobazelbuild:masterfrom
shs96c:good-citizen
Open

Use a private namespace for the java dependencies#676
shs96c wants to merge 1 commit intobazelbuild:masterfrom
shs96c:good-citizen

Conversation

@shs96c
Copy link

@shs96c shs96c commented Dec 23, 2025

The guidelines for rulesets that are not expected to be root modules (such as this one) is that they only contribute to the default maven workspace if their dependencies are required by at runtime by production code that uses the ruleset.

Switching to using a private workspace ensures that this ruleset plays nicely in larger projects.

Also added a lock file to avoid the need to re-run the maven dependency resolution each time the bazel daemon starts.

The guidelines for rulesets that are not expected to be root
modules (such as this one) is that they only contribute to
the default `maven` workspace if their dependencies are
required by at runtime by production code that uses the
ruleset.

Switching to using a private workspace ensures that this
ruleset plays nicely in larger projects.

Also added a lock file to avoid the need to re-run the maven
dependency resolution each time the bazel daemon starts.
@gkdn
Copy link
Collaborator

gkdn commented Jan 6, 2026

@shs96c Have you seen the question/concern in bazel-contrib/rules_jvm_external#916 (comment)

In particular, here we have dependencies like between j2cl and rules_closure. If all j2cl tool dependencies (rules_closure, protobuf, google_common etc) use different maven namespaces how do we deal with with many versions of libs that we end up receiving on the tool side? The problem in user-code <-> library also exists within the context of the rules rule-code <-> library

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