Browse Source

Bazel: Add a target to build jgit commandline tool

This works well enough for basic testing, especially the "jgit daemon"
command:

 $ bazel build org.eclipse.jgit.pgm:jgit
 INFO: Analysed target //org.eclipse.jgit.pgm:jgit (39 packages loaded).
 INFO: Found 1 target...
 Target //org.eclipse.jgit.pgm:jgit up-to-date:
   bazel-bin/org.eclipse.jgit.pgm/jgit.jar
   bazel-bin/org.eclipse.jgit.pgm/jgit
 INFO: Elapsed time: 15.862s, Critical Path: 14.74s
 INFO: 42 processes: 32 linux-sandbox, 1 local, 9 worker.
 INFO: Build completed successfully, 60 total actions
 $ bazel-bin/org.eclipse.jgit.pgm/jgit rev-list HEAD^..HEAD 2>/dev/null
 e5ed926e02dd29b5e970d421b63b6921cc1800f5

Still to do:

 - suppress "Failed to load class "org.slf4j.impl.StaticLoggerBinder"
   output
 - add org.eclipse.jgit.pgm.test tests to bazel build
 - supply package information so that "jgit version" can work

Change-Id: Ie89872839fa5aae974d5d39b6776b96332b0e83f
stable-5.0
Jonathan Nieder 7 years ago
parent
commit
cdc5ec821e
  1. 6
      org.eclipse.jgit.pgm/BUILD

6
org.eclipse.jgit.pgm/BUILD

@ -25,6 +25,12 @@ java_library(
], ],
) )
java_binary(
name = "jgit",
runtime_deps = [":pgm"],
main_class = "org.eclipse.jgit.pgm.Main",
)
java_import( java_import(
name = "services", name = "services",
jars = [":services_jar"], jars = [":services_jar"],

Loading…
Cancel
Save