These were only required as transitive dependency of Velocity, which
was removed in change I9942eb1a9.
Change-Id: Ia55ebd275eafe0987168bafd5b90f108ecc8416d
Reformat the Bazel build files with the buildifier tool [1].
The style is different for Bazel files. Most notably, indentation level
is 4 spaces instead of 2, and " is used instead of '.
[1] https://github.com/bazelbuild/buildifier
Change-Id: I95c0c6f11b6d76572797853b4ebb5cee5ebd3c98
We haven't updated commons-compress for a while. Update now to make
later upgrades easier in case we need a feature or security fix.
Change-Id: If6796f2b52bbd719d1221f56edbe37639e65a802
Add support for secondary index on Elasticsearch via the REST API
using the Jest client [1].
Because Elasticsearch uses different version of Lucene we add another
maven_jar's in gerrit-elasticsearch BUCK. Fortunately both versions have
compatible API, this way we are able to compile and run Gerrit.
All tests for changes index passes, but they need to use Lucene's based
account index.
[1] http://www.searchly.com/documentation/developer-api-guide/java-jest/
TODO: Add support for online reindex
TODO: Add support for schema upgrades
Also-By: Janice Agustin <janice.agustin@ericsson.com>
Also-By: Olga Grinberg <olga.grinberg@ericsson.com>
Also-By: Dariusz Luksza <dluksza@collab.net>
Change-Id: I5e4fc08ce34d33c090c9e0bf320de1b17309f774
Version 1.4.1 does not recognize .team as a valid TLD and thus prevents
users from using that domain as their email address.
Upgrade to version 1.5.1 which uses TLD list Version 2016042500, which
includes .team.
Also add a test for the validator.
The list of TLDs tested is taken from the IANA site [1] and is a later
version that includes some TLDs not yet supported by commons-validator.
Test that supported TLDs validate, while unsupported TLDs do not.
[1] http://data.iana.org/TLD/tlds-alpha-by-domain.txt
Bug: Issue 4154
Change-Id: I82378e578387a1fd70eabac012570e430e193e52
The getReplyStrings() strings is now provided by the base class,
so we do not need to implement it ourselves.
Change-Id: I6a90c3dd11cbc5c7532c2c80f2c81046443b3030
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
commons-io is no longer used in core Gerrit. Remove the dependency and
stop exporting it in the plugin API.
Also update the replication plugin to the latest revision:
- Bundle commons-io since gerrit core no longer provides it
Change-Id: I6bcf6ec6134039de7d8f9c1670167a0318510745
This fixes a bug where a valid email address is incorrectly rejected.
Bug: Issue 2791
Change-Id: I27a538d5b4485ccaded8ec0aa33f5e7797bc1503
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
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
This allows use the standard git archive command to create an archive
of the content of a repository:
$ git archive -f tar.bz2 --prefix=foo-1.0/ \
--remote=ssh://john@gerrit:29418/foo \
refs/changes/73/673/1 > foo-1.0.tar.bz2
Different compression levels can be configured for zip format:
$ git archive -f zip -9 \
--remote=ssh://john@gerrit:29418/foo \
refs/changes/73/673/1 > foo.zip
TEST PLAN:
buck test --include ssh
Bug: Issue 2061
Change-Id: Ifc1a92bacef3155cf474adee883cbe587dd8759f
The elasticsearch REST client (Jest) has dependencies on more of the
libraries from httpcomponents, so it will make things a bit cleaner if
they are all kept in a separate lib.
Change-Id: I5c66b9bd63cbd66136bd7f543a1c4766de052889
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
Since JGit 3.1 archive command was implemented. Add it to download
drop down as new line.
The following libraries are introduced in this change:
* jgit-archive (Apache 2)
* commons-compress (Apache 2)
* tukaani-xz (Public domain)
Change-Id: I5f61aac8c434414c73585a9320e84f4430dd111d
This checks that the email address has a valid format.
Change-Id: I1f8d95dd9b02e720996bd15cca093ca55b5e4597
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
buck build plugins/replication
produces broken META-INF/MANIFEST.MF in replication.jar file.
What Buck is doing is to issue that command (shorten):
jar cfm replication.jar buck-out/gen/plugins/replication/MANIFEST.MF \
buck-out/gen/.../replication__plugin.jar \
buck-out/gen/lib/commons/io/commons-io-1.4.jar
and the content of correct input MANIFEST.MF file get overriden with the
content of MANIFEST.MF from commons-io-1.4.jar.
So instead of expected Gerrit version:
Implementation-Version: v2.7-rc4-1348-g36c61aa
we get:
Implementation-Version: 1.4
Change-Id: If93b1c64e8199c858aa55505352f631790a029ff
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
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