Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a migration path from Maven to Bazel?

Now that Bazel (http://bazel.io/) has been opensourced, is there an incremental process by which I can gradually migrate (a large repository) from Maven to Bazel?

like image 373
Niel de Wet Avatar asked Mar 30 '15 08:03

Niel de Wet


People also ask

What is build file in Bazel?

A BUILD file contains several different types of instructions for Bazel. The most important type is the build rule, which tells Bazel how to build the desired outputs, such as executable binaries or libraries.


2 Answers

And another update (2018)...

There is a dedicated guide on migrating from Maven build tool to Bazel.

And on a general note, it’s best to have both build tools running in parallel until you have fully migrated your development team, CI system, and any other relevant integrations. You can run Maven and Bazel in the same repository.

https://docs.bazel.build/versions/master/migrate-maven.html

like image 118
Johnny Avatar answered Nov 13 '22 04:11

Johnny


September 2019 update

Wix published a tool called Exodus to automatically migrate your Maven project to Bazel.

Additionally, rules_jvm_external has support for managing transitive Maven artifact dependencies.

May 2018 update

Here's another update using Jadep, a BUILD file generator for your Java projects.

There's a tutorial by the author who migrated google-java-format to Bazel: https://github.com/cgrushko/text/blob/master/migrating-gjf-to-bazel.md

like image 41
Jin Avatar answered Nov 13 '22 06:11

Jin