xref: /JGit/org.eclipse.jgit.pgm/BUILD (revision 77848d635b76d8294697ffaf11acf51256df2a5b)
185cea8c5SDavid Pursehouseload("@rules_java//java:defs.bzl", "java_binary", "java_import", "java_library")
285cea8c5SDavid Pursehouse
30f6ddb37SDavid Ostrovskyjava_library(
40f6ddb37SDavid Ostrovsky    name = "pgm",
5c80d8c59SDavid Pursehouse    srcs = glob(["src/**/*.java"]),
60f6ddb37SDavid Ostrovsky    resource_strip_prefix = "org.eclipse.jgit.pgm/resources",
70f6ddb37SDavid Ostrovsky    resources = glob(["resources/**"]),
80f6ddb37SDavid Ostrovsky    visibility = ["//visibility:public"],
9*77848d63SMatthias Sohn    runtime_deps = [
10*77848d63SMatthias Sohn        ":services",
11*77848d63SMatthias Sohn        "//org.eclipse.jgit.gpg.bc:gpg-bc",
12*77848d63SMatthias Sohn    ],
130f6ddb37SDavid Ostrovsky    deps = [
140f6ddb37SDavid Ostrovsky        "//lib:args4j",
15c33e392fSJonathan Nieder        "//lib:commons-logging",
160f6ddb37SDavid Ostrovsky        "//lib:httpclient",
170f6ddb37SDavid Ostrovsky        "//lib:httpcore",
180f6ddb37SDavid Ostrovsky        "//lib:jetty-http",
190f6ddb37SDavid Ostrovsky        "//lib:jetty-io",
200f6ddb37SDavid Ostrovsky        "//lib:jetty-security",
210f6ddb37SDavid Ostrovsky        "//lib:jetty-server",
220f6ddb37SDavid Ostrovsky        "//lib:jetty-servlet",
230f6ddb37SDavid Ostrovsky        "//lib:jetty-util",
240f6ddb37SDavid Ostrovsky        "//lib:servlet-api",
250f6ddb37SDavid Ostrovsky        "//org.eclipse.jgit.archive:jgit-archive",
260f6ddb37SDavid Ostrovsky        "//org.eclipse.jgit.http.apache:http-apache",
270f6ddb37SDavid Ostrovsky        "//org.eclipse.jgit:jgit",
280f6ddb37SDavid Ostrovsky        "//org.eclipse.jgit.lfs:jgit-lfs",
290f6ddb37SDavid Ostrovsky        "//org.eclipse.jgit.lfs.server:jgit-lfs-server",
30a151190bSThomas Wolf        "//org.eclipse.jgit.ssh.apache:ssh-apache",
3132a7c962SDavid Pursehouse        "//org.eclipse.jgit.ui:ui",
320f6ddb37SDavid Ostrovsky    ],
330f6ddb37SDavid Ostrovsky)
340f6ddb37SDavid Ostrovsky
35cdc5ec82SJonathan Niederjava_binary(
36cdc5ec82SJonathan Nieder    name = "jgit",
37cdc5ec82SJonathan Nieder    main_class = "org.eclipse.jgit.pgm.Main",
38afbc55aaSDavid Pursehouse    runtime_deps = [":pgm"],
39cdc5ec82SJonathan Nieder)
40cdc5ec82SJonathan Nieder
410f6ddb37SDavid Ostrovskyjava_import(
420f6ddb37SDavid Ostrovsky    name = "services",
430f6ddb37SDavid Ostrovsky    jars = [":services_jar"],
440f6ddb37SDavid Ostrovsky)
450f6ddb37SDavid Ostrovsky
460f6ddb37SDavid Ostrovskygenrule(
470f6ddb37SDavid Ostrovsky    name = "services_jar",
480f6ddb37SDavid Ostrovsky    srcs = glob(["META-INF/services/*"]),
490f6ddb37SDavid Ostrovsky    outs = ["services_jar.jar"],
500f6ddb37SDavid Ostrovsky    cmd = "r=$$PWD && cd org.eclipse.jgit.pgm && zip -qr $$r/$@ .",
510f6ddb37SDavid Ostrovsky)
52