[英]Build maven project with using buck
I have a problem with BUCK build tool from facebook, when I test it with my old maven project. 我在旧的Maven项目中进行测试时,使用Facebook的BUCK构建工具时遇到问题。
I have sth like this : 我有这样的事情:
-rw-r--r-- 1 piotr users 259 10-03 19:59 BUCK
-rw-r--r-- 1 piotr users 235 10-03 19:56 .buckconfig
drwxr-xr-x 5 piotr users 4096 10-03 19:58 buck-out/
-rw-r--r-- 1 piotr users 267 10-03 19:59 BUILD
drwxr-xr-x 2 piotr users 4096 08-11 16:53 configs/
-rw-r--r-- 1 piotr users 3988 09-04 11:55 pom.xml
drwxr-xr-x 3 piotr users 4096 09-04 17:18 src/
cat .buckconfig 猫.buckconfig
[java]
src_roots = /src/main/java/, /src/main/resources/
source_level = 8
target_level = 8
[download]
maven_repo = http://repo.maven.apache.org/maven2/
in_build = true
[project]
ignore = .git, target
cat BUILD 猫建
java_binary(
name = "app",
main_class = "com.example.daemon.Server",
runtime_deps = [":main"],
)
java_library(
name = "main",
srcs = glob(["src/main/java/**/*.java"]),
resources = glob(["src/main/resources/**"]),
deps = ["@gson//jar"],
cat BUCK 猫巴克
java_binary(
name = "app",
main_class = "com.example.daemon.Server",
deps = [":main"],
)
java_library(
name = "main",
srcs = glob(["src/main/java/**/*.java"]),
resources = glob(["src/main/resources/**"]),
deps = ["//dep:gson"],
)
and i try command : 我尝试命令:
buck targets
Not using buckd because watchman isn't installed.
[+] PROCESSING BUCK FILES...0,0s [100%]
BUILD FAILED: Couldn't get dependency '//dep:gson' of target '//:main':
No build file at dep/BUCK when resolving target //dep:gson.
✘ ~/p/replication-daemon : ➦ 16ae702 ±
How I can add maven repositories to buck project? 如何将Maven存储库添加到buck项目? (like in gson in this case) I'm looking for any examples, but I don't find anything...
(就像在这种情况下的gson中一样)我正在寻找任何示例,但是我什么也没找到...
I will be gratefull for any answers... 如果有任何答案,我将不胜感激。
You can use buck fetch , and the remote_file rule. 您可以使用buck fetch和remote_file规则。 Or even better, check the jar into the repository and use the prebuilt_jar rule.
甚至更好的是,将jar放入存储库并使用prebuilt_jar规则。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.