Commit Graph

14 Commits

Author SHA1 Message Date
Ivan Frade ca1c70ff5f pgm/BUILD: Add dependencty to java EWAH
A fetch to a locally run daemon triggers a runtime exception:

Listening on localhost/127.0.0.1:9418
java.lang.NoClassDefFoundError:
com/googlecode/javaewah/EWAHCompressedBitmap

Add javaEWAH in the deps of the PGM library.

To reproduce:

0. Assume a git repo in <dir-with-repos>/a-repo
1. Run daemon e.g.:
  $ bazel run //org.eclipse.jgit.pgm:jgit -- daemon --export-all=true
  --listen localhost --enable upload-pack <dir-with-repos>

2. Fetch:
  $ git clone git://0.0.0.0:9418/a-repo

Change-Id: I503f9fe45347a5891c3f3de0452b7f300b1e8206
2022-10-05 19:12:45 -04:00
Matthias Sohn 8d2d683655 Decouple JSch from JGit Core
Motivation: JSch serves as 'default' implementations of the SSH
transport. If a client application does not use it then there is no need
to pull in this dependency.

Move the classes depending on JSch to an OSGi fragment extending the
org.eclipse.jgit bundle and keep them in the same package as before
since moving them to another package would break API. Defer moving them
to a separate package to the next major release.

Add a new feature org.eclipse.jgit.ssh.jsch feature to enable
installation. With that users can now decide which of the ssh client
integrations (JCraft JSch or Apache Mina SSHD) they want to install.
We will remove the JCraft JSch integration in a later step due to the
reasons discussed in bug 520927.

Bug: 553625
Change-Id: I5979c8a9dbbe878a2e8ac0fbfde7230059d74dc2
Also-by: Michael Dardis <git@md-5.net>
Signed-off-by: Michael Dardis <git@md-5.net>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Signed-off-by: David Ostrovsky <david@ostrovsky.org>
2020-06-01 01:46:59 +02:00
Matthias Sohn 77848d635b Decouple BouncyCastle from JGit Core
Motivation: BouncyCastle serves as 'default' implementation of
the GPG Signer. If a client application does not use it there is no need
to pull in this dependency, especially since BouncyCastle is a large
library.

Move the classes depending on BouncyCastle to an OSGi fragment extending
the org.eclipse.jgit bundle. They are moved to a distinct internal
package in order to avoid split packages. This doesn't break public API
since these classes were already in an internal package before this
change.

Add a new feature org.eclipse.jgit.gpg.bc to enable installation. With
that users can now decide if they want to install it.

Attempts to sign a commit if org.eclipse.jgit.gpg.bc isn't available
will result in ServiceUnavailableException being thrown.

Bug: 559106
Change-Id: I42fd6c00002e17aa9a7be96ae434b538ea86ccf8
Also-by: Michael Dardis <git@md-5.net>
Signed-off-by: Michael Dardis <git@md-5.net>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Signed-off-by: David Ostrovsky <david@ostrovsky.org>
2020-06-01 01:26:22 +02:00
David Ostrovsky f17cb089aa Bazel: Remove superfluous dependencies flagged by unused_deps
Bazel buildtools project includes in addition to buildifier also unused
deps and buildozer utilities, that detect unused dependencies and fix
them by applying the removal to the build files. This change is created
by installing unused_deps from buildtools@HEAD and running:

  $ unused_deps //...

and applying the suggested modifications.

Change-Id: Iad74ec2fa719475b29391586f40b13ae30477004
Signed-off-by: David Ostrovsky <david@ostrovsky.org>
2020-05-22 17:48:19 +02:00
Matthias Sohn 38198972d4 Merge branch 'stable-5.1' into stable-5.2
* stable-5.1:
  Bazel: Fix warning about deprecated lib.bzl
  Format lib/BUILD with buildifier
  Bazel: Add fixes for --incompatible_load_java_rules_from_bzl
  Bazel: Bump minimum supported version to 0.29.0
  Bazel: Bump skylib library version to 0.8.0
  Use bazelisk to switch between used bazel version
  Bazel: Require minimum bazel version 0.17.1
  Fix wrong placeholder index in error message packInaccessible
  JGitText: Remove unused externalized strings
  RepoText: Remove unused externalized string
  CLI: Remove unused externalized strings

Change-Id: Iea37a8e39e9d4872dc607c9222dcf191ce4e4757
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-09-07 12:16:42 +02:00
David Pursehouse 85cea8c583 Bazel: Add fixes for --incompatible_load_java_rules_from_bzl
Change-Id: I24746335db132bf20f400cb3db400737596d4542
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2019-09-07 15:36:11 +09:00
David Pursehouse 32a7c9622e Format org.eclipse.jgit.pgm/BUILD with buildifier
Change-Id: I08de1e262c56ffdd9f4bc9b58f7b43964cce969a
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2018-11-14 08:06:45 -08:00
Thomas Wolf a151190bef Add --ssh option to command-line commands
Enables using the new ssh client based on Apache MINA sshd instead
of the old JSch client. The default is still JSch, so unless the
command is invoked with --ssh apache, there's no change.

I prefer this over some fiddling with the GIT_SSH environment variable
since that variable is handled in the JGit core bundle, which should
remain free of any dependency to org.eclipse.jgit.ssh.apache to avoid
problems in Gerrit or other JGit users that may use a different Apache
MINA sshd version.

Bug: 520927
Change-Id: I8460759c7113ef7887520fb0d297aa312200c69f
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2018-11-14 04:47:33 -08:00
Jonathan Nieder c33e392f9b pgm: Add missing dependency on commons-logging
Without this, commands like "jgit repo" that use commons-logging fail.

Change-Id: Ia78198c5e15ac4d6152d832ab2a2498f625486d2
Signed-off-by: Jonathan Nieder <jrn@google.com>
2018-10-01 18:25:22 -04:00
David Pursehouse 0718d22cf4 Merge branch 'stable-4.11' into stable-5.0
* stable-4.11:
  Bazel: Use hyphen instead of underscore in external repository names
  Bazel: Format all build files with buildifier 0.15.0
  ChangeIdUtilTest: Remove unused notestCommitDashV

Change-Id: I5ebb1058927ea5a478eae9e44b7d96f123a22523
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2018-08-31 15:45:42 +09:00
David Pursehouse afbc55aa22 Format BUILD files with buildifier 0.15.0
Change-Id: I6200b0040d24da86968c688f45a2056343e182be
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2018-08-30 08:56:19 +09:00
Jonathan Nieder cdc5ec821e 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
2018-05-02 14:43:26 -07:00
David Pursehouse c80d8c5901 Bazel: Restrict src globs to Java source files
Generating the src list with an unrestricted wildcard causes all
files in the source tree to be included. This results in junk files
such as .orig (generated during merge conflict resolution) to be
included, which causes in a build error:

  in srcs attribute of java_library rule //org.eclipse.jgit:jgit:
  file '//org.eclipse.jgit:src/org/eclipse/jgit/gitrepo/RepoCommand.java.orig'
  is misplaced here (expected .java, .srcjar or .properties).

Modify the globs to only include Java source files.

Change-Id: Iaef3db33ac71d71047cd28acb0378e15cb09ece9
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2017-04-13 14:14:55 +09:00
David Ostrovsky 0f6ddb372b Add remaining parts of the bazel build
Add bazel build for ui and junit.http, and the test packages.

A number of different test labels are supported:

  api
  attributes
  dfs
  diff
  http
  lfs
  lfs-server
  nls
  notes
  pack
  patch
  pgm
  reftree
  revplot
  revwalk
  storage
  submodule
  symlinks
  transport
  treewalk
  util

To run all tests:

  bazel test //...

To run specific tests, using labels:

  bazel test --test_tag_filters=api,dfs,revplot,treewalk //...

Change-Id: Ic41b05a79d855212e67b1b4707e9c6b4dc9ea70d
Signed-off-by: David Ostrovsky <david@ostrovsky.org>
Signed-off-by: Jonathan Nieder <jrn@google.com>
2017-03-21 09:24:12 +01:00