8 Commits

Author SHA1 Message Date
Yuxuan 'fishy' Wang
75b98f77d9 bazel: add license to appropriate lib/ targets
This is to prepare for implementing genlicenses rule in bazel.

Change-Id: I60d79d5b53f9dd05c9f9ebfe6e6f658604c5a037
2016-09-26 16:42:38 +08:00
David Ostrovsky
b81b4f75ae Implement Bazel build
To run the tests:

  bazel test //...

To build the Gerrit plugin API, run:

  bazel build gerrit-plugin-api:plugin-api_deploy.jar

To build the Gerrit extension API, run:

  bazel build gerrit-extension-api:extension-api_deploy.jar

TODOs:

Licenses
Reduce visibility (all public for now)
Generate HTML Documentation
Core plugins
gerrit_plugin() rule to build plugins in tree and standalone modes
GWT UI (only gwt_module() skylark rule is provided, no gwt_binary())
PolyGerrit UI
WAR
Publish artifacts to Maven Central
Ask Bazel team to add Gerrit to their CI on ci.bazel.io

Contributed-By: Han-Wen Nienhuys <hanwen@google.com>
Change-Id: I9a86e670882a44a5c966579cdeb8ed79b1590de3
2016-06-14 21:12:02 +02:00
Doug Kelly
1cbfe97c91 Changing the SSH key converter to BUCK
Since we're a BUCK shop, convert the SSH key converter accordingly.
This requires we mark Bouncy Castle as unsign, even though we
do not include this in our normal Gerrit builds.  Also, we had to
add slf4j-nop, since this app doesn't require logging.

Change-Id: I85031192f9172a90512d5f28cf1621c10ad6ebf4
2015-11-09 10:59:32 -08:00
Gustaf Lundh
d00e9e7b99 Package jsonevent-layout with war
Since java does not allow aditional -classpaths when loading
a -jar (or war in Gerrits case), it is more or less impossible
to add a new external log4j appender when using embedded jetty.

This change packages the common jsonevent-layout appender and
its dependencies with gerrit.war, allowing logging in json-format
(usable for instance when sending logs to logstash).

This change also updates commons-lang from 2.5 to 2.6 which is
preferred by jsonevent-layout.

Change-Id: I1a6e35c9e0da571bf88718ce5e56c5d9e8649203
2015-04-29 13:26:01 +00:00
David Ostrovsky
b1e9143246 Update httpclient and dependencies
The new release fixes a number of bugs [1].

Also replace deprecated DefaultHttpClient with HttpClientBuilder.

[1] http://www.apache.org/dist/httpcomponents/httpclient/\
RELEASE_NOTES-4.3.x.txt

Change-Id: I3cdd566d5edf313673d79df3707de010a395b5b6
2014-06-23 07:02:31 +00:00
David Ostrovsky
47a887cd96 Update log4j and slf4j to the latest released versions
Change-Id: I3ed005d465b9f11bc322ddc4e4bf545b21f13781
2014-03-25 16:06:53 +00:00
Ahaan Ugale
404c8246bc Add secondary index implementation using SolrCloud
SolrCloud can be used instead of Lucene by adding "type = SOLR"
under [index] and "url = <zookeeper-url>" under [index "solr"]
in gerrit.config.

Change-Id: I0ff8579c5e23c58b16f3605bc20eba4e80fb40fc
2013-06-27 13:52:39 -07:00
Shawn Pearce
fd6bb9f6a5 Build with Buck
Implement a new build system using Buck[1], Facebook's
open source clone of Google's internal build system.

  Pros:
  - Concise build language
  - Test and build output is concise
  - Test failures and stack traces show on terminal
  - Reliable incrementals; clean is unnecessary
  - Extensible with simple blocks of Python
  - Fast
      buck: clean: 0.452s, full 1m21.083s [*], no-op:  7.145s,
      mvn:  clean: 4.596s, full 2m53.776s,     no-op: 59.108s,

      [*] full build includes downloading all dependencies,
          time can vary due to remote server performance.

  Cons:
  - No Windows support
  - No native Maven Central support (added by macros)
  - No native GWT, Prolog, or WAR support (added by macros)
  - Bootstrap of buck requires Ant

Getting started:

  git clone https://gerrit.googlesource.com/buck
  cd buck
  ant

  Mac OS X:
    PATH="`pwd`/bin:/System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands:$PATH"

  Linux:
    PATH="`pwd`/bin:$PATH"

Importing into Eclipse:

  $ time buck build :eclipse
  0m48.949s

  Import existing project from `pwd`
  Import 'gerrit' (do not import other Maven based projects)
  Expand 'gerrit'
  Right click 'buck-out' > Properties
  Under Attributes check 'Derived'

  If the code doesn't currently compile but an updated classpath
  is needed, refresh the configs and obtain missing JARs:

  $ buck build :eclipse_project :download

Running JUnit tests:

  $ time buck test --all -e slow  # skip slow tests
  0m19.320s

  $ time buck test --all          # includes acceptance tests
  5m17.517s

Building WAR:

  $ buck build :gerrit
  $ java -jar buck-out/gen/gerrit.war

Building release:

  $ buck test --all && buck build :api :release
  $ java -jar buck-out/gen/release.war
  $ ls -lh buck-out/gen/{extension,plugin}-api.jar

Downloading dependencies:

  Dependencies are normally downloaded automatically, but Buck can
  inspect its graph and download missing dependencies so future
  compiles can run without the network:

  $ buck build :download

[1] http://facebook.github.io/buck/

Change-Id: I40853b108bd8e153cefa0896a5280a9a5ff81655
2013-05-09 13:40:36 +00:00