Skip to content
A template for wrapping any Java builder (eg., Maven Takari builder) and bring it into Bazel.
Java Python
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.

README.md

Bazel Java Builder Template

A template for wrapping any Java builder (eg., Maven Takari builder) and bring it into Bazel.

How it works

This template was heavily inspired by rules_scala and rules_avro. It follows the recommendation given by Deploying Rules. It's designed to allow wrapping existing Java builders (eg., like Maven Takari builders) for Bazel. These builders don't need to be pre-built. Instead they will be compiled as part of the Bazel build using those.

Support for persistent workers is included.

  • Clone this Git repo
  • Copy your builder source code into src/main/java
  • Add the builder dependencies to pom.xml and to builder_rules function (see mybuilder.bzl).
  • Use the rename.sh script to rename the rules.

Contribution Guide

This project uses both: Maven and Bazel. Maven is used for best IDE experience. Bazel is used for command line build and delivery.

Few things to keep in mind:

  • The Bazel build files are source of truth for producing deliverables, i.e. don't bother adding Maven plug-ins to pom.xml files.
  • Maven drives Eclipse M2E for development of this tool. Nothing more.
  • Don't get too fancy with Bazel, though. It has to map to Maven for IDE classpath computation.
  • We'll eventually switch from M2E to the Bazel plug-in once it's more usable.
You can’t perform that action at this time.