Gerrit 插件编译
29 Oct 2017下述方法适合 Gerrit stable-2.13
-
下载 Gerrit 源码
-
安装 Gerrit 编译工具
- Bazel
- Maven
-
下载插件
将插件的源码放入 Gerrit 源码的 plugins 目录下
需要注意的是,插件的版本要和 Gerrit 源码的版本匹配,建议 check 相应的 tag
-
编译插件
cd gerrit bazel build plugins/<plugin-name>
-
提取编译后的插件
通常编译后的插件被放在
buck-out/gen/plugins/<plugin-name>/<plugin-name>.jar
当然你也可以直接使用
find
命令搜索出来 -
Gerrit 服务器部署
将编译后的插件拷贝到 Gerrit 服务器的 plugins 目录,最后重启 Gerrit 服务