xref: /JGit/org.eclipse.jgit.pgm/BUILD (revision 8d2d683655e2de17cf465fa46af10e0e56b3aaed)
1load("@rules_java//java:defs.bzl", "java_binary", "java_import", "java_library")
2
3java_library(
4    name = "pgm",
5    srcs = glob(["src/**/*.java"]),
6    resource_strip_prefix = "org.eclipse.jgit.pgm/resources",
7    resources = glob(["resources/**"]),
8    visibility = ["//visibility:public"],
9    runtime_deps = [
10        ":services",
11        "//org.eclipse.jgit.gpg.bc:gpg-bc",
12    ],
13    deps = [
14        "//lib:args4j",
15        "//lib:commons-logging",
16        "//lib:httpclient",
17        "//lib:httpcore",
18        "//lib:jetty-http",
19        "//lib:jetty-io",
20        "//lib:jetty-security",
21        "//lib:jetty-server",
22        "//lib:jetty-servlet",
23        "//lib:jetty-util",
24        "//lib:servlet-api",
25        "//org.eclipse.jgit.archive:jgit-archive",
26        "//org.eclipse.jgit.http.apache:http-apache",
27        "//org.eclipse.jgit:jgit",
28        "//org.eclipse.jgit.lfs:jgit-lfs",
29        "//org.eclipse.jgit.lfs.server:jgit-lfs-server",
30        "//org.eclipse.jgit.ssh.apache:ssh-apache",
31        "//org.eclipse.jgit.ssh.jsch:ssh-jsch",
32        "//org.eclipse.jgit.ui:ui",
33    ],
34)
35
36java_binary(
37    name = "jgit",
38    main_class = "org.eclipse.jgit.pgm.Main",
39    runtime_deps = [":pgm"],
40)
41
42java_import(
43    name = "services",
44    jars = [":services_jar"],
45)
46
47genrule(
48    name = "services_jar",
49    srcs = glob(["META-INF/services/*"]),
50    outs = ["services_jar.jar"],
51    cmd = "r=$$PWD && cd org.eclipse.jgit.pgm && zip -qr $$r/$@ .",
52)
53