The skip pom generation mode can be used to mark bazel targets that provide dependencies only, but that do not produce any Maven artifacts. All dependencies of these types of targets will be added to pom generated for the referencing target.
The libraries in this example reference each other the following way:
parent (contains 2 artifacts: parent1 and parent2) -> passthrough -> lib
From the root of the repository:
bazel run @pomgen//:pomgen -- --package examples/skip-artifact-generation/parent --destdir /tmp/pomgen
The command above generates 3 poms, for:
All dependencies specified in the passthrough package are included in the pom's of parent1
and parent2
.