Skip to content

Bazel

Caching

Dependencies explains how the Bazel cache works on CI.

Maven dependencies

Add New Maven dependencies

As per https://github.com/bazelbuild/rules_jvm_external/blob/master/README.md#updating-maven_installjson :

  1. Edit dependencies in WORKSPACE.bazel (later MODULE.bazel)

  2. REPIN=1 b run @unpinned_maven//:pin

PS: Use b query "@maven//:*" to see all targets.

Update Existing Maven dependencies

./update.bash

Dependency Tree

The equivalent of mvn dependency:tree is easily visible in the maven_install.json, which lists all artifacts versions, transitive dependencies, and Java packages.