bazel-contrib / bazel-contrib/rules_jvm_external

Equivalent of maven's dependencyManagement for steering resolution of transitive deps

Open
#550 1 comment 3 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
373
Forks
301
Avg merge
7d 17h
Merged PRs (30d)
3

Description

I'm looking to migrate our multi module maven project to bazel. Have hit a bit of a snag around transitive dependencies though that I'd love some advice on.

In my maven parent pom.xml, we specify a number of `` that don't actually have any corresponding `` in child poms, but that are used by the reactor to steer the resolution of transitive deps. In some cases (eg quarkus-universe) these are `pom` deps, that actually explode out to 1000s of artifacts.

In `maven_install` is there any way to provide such a hint without simply defining it as an artifact? I've successfully just copied the dependencyManagement list and added it to the artifacts in the maven_install list, but on one of my projects I'm then hitting issues with the sheer number of artifacts that this creates for resolution - when the chances are most of the jars aren't actually used/needed. (https://github.com/bazelbuild/rules_jvm_external/issues/549 is the related issue for what happens when trying to pin a list of 3500 artifacts)

Contributor guide

Open the contributing guide

Research direction

Start by reading the dependencyManagement example in pom.xml and the maven_install configuration described in the issue. Compare how transitive dependencies and type=pom artifacts are handled, then review issue #549 for the large-artifact-resolution constraint. Done means a documented or implemented way to steer transitive resolution without eagerly adding every managed artifact.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.