Bazel Maven Repository Rules v1.0 Release Candidate 6
Pre-release
Pre-release
Production Release (candidate 6) of a convenience mechanism to import maven artifacts into a
bazel workspace in a way that is idiomatic to Bazel, but still ends up familiar to people used to
maven repository handling.
This release includes:
- Single specification of a list of artifacts representing the "universe"
- Supports multiple repo roots (e.g. alternatives to repo1.maven.org/maven2)
- Generates a bazel package path per maven group_id, and a target per artifact_id
- Supports .jar and .aar packaging
- Very limited support for classifiers (can use the default artifact or a classifier, but not both)
- Supports SHA256 validation of the artifact (with an insecure option for not specifying them)
- Tested with java and kotlin rules, including test rules.
- auto-building of inter-artifact dependencies (from parsed pom metadata)
- Parent metadata, dependencyManagement, and properties substitution are all supported
- per-artifact build-snippet substitution (e.g. to wire in annotation processors, or fix mis-specified deps)
- per-groupId dependency target substitution (to fix internal build cycles created by build snippet substitution)
- Tested against java, kotlin, and android projects.
Fixes from last RC:
- Add support for exports= in the underlying import feature, so exports= can be used for convenience build snippets, or workarounds. This fixes a regression in #48 which added an ijar-avoiding import rule which did not support an exports parameter.
Known limitations:
- Doesn't support -SNAPSHOT dependencies (pending v1.1)
- Only supports single-version per maven_repository_spec() invocation (monorepo-style).
- Doesn't support multiple maven_repository_spec() calls
- Doesn't work on Windows by default (requires cat to be installed as a binary tool, which
could potentially be fixed if bazelbuild/bazel#7309 is accepted
Please see the README.md file for usage instructions and examples of the above features.