1

我正在尝试通过 Buck 构建构建 Gerrit 插件“events-log”jar(https://gerrit.googlesource.com/plugins/events-log),但它失败并出现以下错误:

root@jenkins-test:~/events-log# ll
drwxr-xr-x  7 root root 4096 Jun 29 13:25 ./
drwxrwxr-x 24 root root 4096 Jun 29 13:22 ../
-rw-r--r--  1 root root 1017 Jun 29 12:57 BUCK
-rw-r--r--  1 root root  173 Jun 29 12:57 .buckconfig
drwxr-xr-x  3 root root 4096 Jun 29 13:25 .buckd/
drwxr-xr-x  6 root root 4096 Jun 29 13:05 buck-out/
drwxr-xr-x  8 root root 4096 Jun 29 13:27 .git/
-rw-r--r--  1 root root  146 Jun 29 12:57 .gitignore
drwxr-xr-x  5 root root 4096 Jun 29 12:57 lib/
drwxr-xr-x  4 root root 4096 Jun 29 12:57 src/

root@jenkins-test:~/events-log# /root/buck/bin/buck build events-log:events-  
log
Using buckd.
BUILD FAILED: No build file at events-log/BUCK when resolving target  

//事件日志:事件日志。

有人可以告诉如何修复它并构建 jar。

谢谢

4

4 回答 4

6

我想我终于想通了...

我最终要做的是检查 Gerrit 并在 Gerrit 树中构建事件日志插件。

git clone https://gerrit.googlesource.com/gerrit
cd gerrit
git co v2.11.2
git submodule init
git submodule update

git clone https://gerrit.googlesource.com/plugins/events-log plugins/events-log
buck build plugins/events-log
于 2015-08-04T00:39:54.347 回答
0

I'm pretty sure you just want /root/buck/bin/buck build //:events-log. See http://buckbuild.com/concept/build_target.html

于 2015-06-29T22:32:04.027 回答
0

最终我找到src/main/resources/Documentation/build.md了,我终于成功地构建了事件日志:

git clone https://gerrit.googlesource.com/plugins/events-log
git clone https://gerrit.googlesource.com/bucklets
cd events-log
git checkout stable-2.12
ln -s ../bucklets .
ln -s bucklets/buckversion .buckversion
ln -s bucklets/watchmanconfig .watchmanconfig
buck build plugin

这建立buck-out/gen/events-log.jar.

于 2016-04-10T16:46:41.090 回答
0

如果版本是2.14或更高版本,请使用bazle构建我也尝试用buck构建v2.13,您需要修改bucklets文件夹下的gerrit_plugin.bucklet

旧内容:target_suffix = ''): from multiprocessing import cpu_count from os import path,getcwd 新内容:target_suffix = ''): with allow_unsafe_import(): from multiprocessing import cpu_count from os import path,getcwd

然后执行“buck build plugin

输出:ruhu@CCM-P700:~/tools/events-log$ buck build plugin 下载http://repo1.maven.org/maven2/com/google/code/gson/gson/2.3.1/gson-2.3 .1-sources.jar

下载http://repo1.maven.org/maven2/com/google/code/gson/gson/2.3.1/gson-2.3.1.jar

下载http://repo1.maven.org/maven2/com/google/gerrit/gerrit-plugin-api/2.13/gerrit-plugin-api-2.13.jar

解析 buck 文件:在 1.3 秒内完成 (100%) 创建动作图:在 1.6 秒内完成 (100%) 构建:在 03:47.3 分钟内完成 (100%) 19/19 个作业,19 个更新,94.7% 缓存错误 总时间: 03:50.3 分钟

于 2018-02-01T04:55:58.437 回答