96 Commits

Author SHA1 Message Date
David Ostrovsky
946d6c3b14 Move prolog:common rule to gerrit-server root build file
Change-Id: Iacbff16b71d8464ccea6d2b631868e24a0605ec4
2017-05-18 06:17:11 +02:00
David Pursehouse
4042d43567 Merge branch 'stable-2.14'
* stable-2.14:
  Bazel: Allow plugins to non-transitively depend on prolog rules

Change-Id: I6d9c7e4795249ab8c97fb064f0ebb2dd5aee8ef1
2017-05-17 19:48:49 +09:00
David Ostrovsky
b9400254a6 Bazel: Allow plugins to non-transitively depend on prolog rules
Some plugins, most notably owners-plugin, depend on prolog:common rule.
Given that this rule transitively depends on gerrit-server:server rule,
and this rule depends on virtually whole gerrit build graph, the final
plugin artifact contains effectively the whole gerrit war file content.

To fix that we expose prolog:common in plugin API. Moreover, adjust
prolog_cafe_library to not transitively depend on prolog runtime
library. We can do it, because gerrit-server already depends on it, so
that it's included in gerrit war anyway.

This change allows the owners-plugin to de-duplicate its size from 45 MB
to 1.5 MB only.

Change-Id: I8d7198a911c2da444c1822509988eda7d369af77
2017-05-17 08:51:13 +02:00
David Pursehouse
2ae3b327d6 Merge branch 'stable-2.14'
* stable-2.14:
  Update list of maintainers in pom.xml files

Change-Id: I59270a205415a040312e36f89a66c665953d5908
2017-05-15 16:42:35 +09:00
David Pursehouse
3c0899307e Update list of maintainers in pom.xml files
Change-Id: I9bc103431c674b892d696490e7638a2a2f4ac408
2017-05-15 16:27:18 +09:00
David Pursehouse
03453bef90 Set version to 2.14
Change-Id: I5694579a543454322717a1d129e34d4140100479
2017-04-26 15:55:55 +02:00
Patrick Hiesel
e8bf91efaf Release 2.14-rc1
Change-Id: I85790145f2114b4ab9801a78fddc201e59766a8e
2017-04-24 16:03:54 +02:00
David Pursehouse
0450fde6ac Merge branch 'stable-2.14'
* stable-2.14:
  Add new Polygerrit maintainers to developers list in pom.xml files

Change-Id: I7f3e251081493b87e31075b1a1fa4779f8de1c4b
2017-04-22 06:33:24 +02:00
David Pursehouse
c211c0f9fa Add new Polygerrit maintainers to developers list in pom.xml files
Change-Id: I67bce6cb15e416f213633519bc1274a0aefddf35
2017-04-21 22:22:44 +02:00
David Pursehouse
05e558972c Merge branch 'stable-2.14'
* stable-2.14:
  Add new maintainers to developers section in pom.xml files
  Update Version to 2.14-rc0

Change-Id: Ib620c5f49ec5dee1a838c082f74b785689edba71
2017-04-12 09:44:54 +09:00
David Ostrovsky
6100054dbd Add new maintainers to developers section in pom.xml files
Change-Id: I2f6133a27e6f3a036f82442d5fcdc5a1b6c35f9a
2017-04-11 21:13:05 +02:00
Patrick Hiesel
ee94d108fe Update Version to 2.14-rc0
Change-Id: Ibafb67dcf186a6ec68f39009074cc210877979e5
2017-04-11 15:12:36 +02:00
David Pursehouse
23fa65a65b Set version to 2.15-SNAPSHOT
Change-Id: I560b77a951558cc25a0fddd436540e9fed87975e
2017-03-23 21:11:23 +09:00
David Ostrovsky
7fc8a69c8f Expose commons-lang3 in plugin API
commons-lang is already exposed in the plugin API. Given that some
plugins depend on commons-lang3, expose it too, to make building
the plugins against it easier.

Change-Id: I16e2dda225738b24489da810f43d8148af39acbf
2017-02-05 23:42:37 +00:00
David Ostrovsky
fdbfcad77d Remove Buck based build
Bug: Issue 5302
Change-Id: I6e860446ef30ff0ad1c7c49fc0e39d39d921820b
2017-01-23 12:44:58 +00:00
David Ostrovsky
709627f8f1 Export httpcore in plugin API
This allows plugins to support in tree Gerrit build.

Reported-By: Hugo Arès <hugo.ares@ericsson.com>
Change-Id: Ice25958041d4fb455f75bb3d63f62e08934c9ae6
2016-12-20 09:16:16 +01:00
David Ostrovsky
b5987842d8 Bazel: Actually expose servlet API in plugin API
Reported-By: Hector Oswaldo Caballero <hector.caballero@ericsson.com>
Change-Id: I29aa6f500a00aa8fa55520d4652f7c750b5ce547
2016-12-16 10:24:13 +01:00
David Ostrovsky
50493de32f Expose httpclient in plugin API
Reported-By: Hector Oswaldo Caballero <hector.caballero@ericsson.com>
Change-Id: I963a8988f9c75da522e75a30c08e54e1ca88476c
2016-12-16 10:24:13 +01:00
David Ostrovsky
fa18907d7f Bazel: Reformat build files
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
2016-12-07 11:33:07 +00:00
David Ostrovsky
50785fdbb2 Bazel: Publish maven artifacts to local and remote repositories
Currently too big files are published, because some unwanted transitive
dependencies are included in the final artifacts. That will be fixed in
follow-up change by using neverlink option in java_library rule or using
provided_deps attribute that will be addded in future releases of Bazel:
[1].

TEST PLAN:

  $ VERBOSE=1 tools/maven/api.sh install bazel
  $ VERBOSE=1 tools/maven/api.sh install buck

* [1] https://github.com/bazelbuild/bazel/issues/1402

Change-Id: Ie73d4ae34d96be7f97f6329c4c30c814f54688d5
2016-11-03 12:47:24 +00:00
David Pursehouse
a5f61d4667 Merge branch 'stable-2.13'
* stable-2.13:
  Export prolog runtime in plugin API

Change-Id: I4348d693c9ff39b447374b86d5def8c72a767c13
2016-10-23 15:24:08 +09:00
David Ostrovsky
77464107c4 Export prolog runtime in plugin API
In Ieb3666281 prolog compiler was exposed in the plugin API. Turns out
that same plugins also need prolog runtime. Add it as well to simplify
the build for those plugins.

Change-Id: I22b74b8c9c13d529d65cb664173d23d7430b50a4
2016-10-21 07:34:31 +00:00
David Pursehouse
7e2d2f2707 Set version to 2.13.2
Change-Id: I37839ff47ac133de689a7a4ecc06bb1dd2c17fba
2016-10-19 17:42:55 +09:00
Hugo Arès
52653bf971 Set version to 2.13.1
Change-Id: Ib4d8086f25867f6a440d02816778108d2ad4470b
2016-09-23 14:28:31 +02:00
David Ostrovsky
c48e6c9730 Bazel: Build core plugins
Change-Id: Ic8ed6fcdb8cdab9cb7eaba436c5fdffc6670d1b4
2016-09-23 14:20:13 +02:00
David Ostrovsky
d7b072e357 Plugin API: Export log4j library
Change-Id: I6f878e4f31ebe6fb1e32998b784892746044e9c9
2016-09-23 14:19:21 +02:00
Hugo Arès
6c3dc1b733 Set version to 2.13.1-SNAPSHOT
I did not change the archetype version referred in the dev documentation
in case documentation need to be updated before 2.13.1 is released.

Change-Id: I5bef5050da4e5f1cbe46041a2ba605e8b192aa6e
2016-09-22 09:22:59 +02:00
David Pursehouse
c36d5aabe2 Set version to 2.13
Change-Id: I3acf8ce118acf7fee4f94cd4059bdd4b1d2da9b5
2016-09-21 16:26:03 +02:00
Han-Wen Nienhuys
e703f3a35a Bazel: add java_doc rule
Add javadoc rules for plugin API:

* gerrit-extension-api
* gerrit-plugin-api
* gerrit-acceptance-framework

Note that GWT UI is not covered by Bazel build yet, so that we cannot
offer gerrit-plugin-gwtui:plugin-gwtui-javadoc rule in this change.

TEST PLAN:

  bazel build gerrit-acceptance-framework:acceptance-framework-javadoc
  bazel build gerrit-extension-api:extension-api-javadoc
  bazel build gerrit-plugin-api:plugin-api-javadoc

Change-Id: I60832752010118e33eb6a06529032d86f169ee44
2016-09-19 16:57:16 +02:00
David Ostrovsky
5e2f370bff Bazel: Create sources for plugin API
To pubish to Maven Central, sources and javadoc artifacts must be
created. Bazel java_library and java_binary rules provide sources out
of the box. We need to combine single source artifacts (server, httpd
and sshd) in ueber JAR and use java_binary rule for it.

TEST PLAN:

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

Change-Id: Iafb549b5d0c0b0d7749f301b1edbd48b167eea3b
2016-09-19 16:55:07 +02:00
David Pursehouse
53c29d1643 Set version to 2.13-rc1
Change-Id: I7cfc123378a4ff9169c60f9766809da6e56d62b1
2016-09-15 09:00:06 +02:00
David Ostrovsky
c13d8feb30 Buck: Create javadoc from source archive
javadoc accepts source archive and we need to create one anyway. So
instead of trying to use the sources in the tree and guess the root
project directory, just use the source archive. We extact the archive
in temporary directory to make javadoc work.

Change-Id: Ib605f6cdab4742a23789da8fbc9c963c83e5b6d9
2016-09-07 22:49:38 +02:00
Han-Wen Nienhuys
bcb46c3cd8 bazel: upgrade Guice to 4.1.0, add multibindings
Change-Id: If9da85ffa0d5f5eba355764c28fca9d33664f894
2016-08-25 15:32:56 -03:00
Wyatt Allen
bdffdea92f Adds the Soy library and injects it via EmailArguments
This change lays the groundwork for migrating email templates from VTL
to Soy (Closure Templates). This change does not modify the existing
template system or how emails are constructed. Moreover, it makes the
Soy library available alongside the Velocity library.

With this change, the Soy library (along with its dependencies) is added
to //gerrit-server:server and //gerrit-plugin-api:lib. A new license
definition is included for ICU4J.

A Guice provider for SoyTofu objects (which work as factories for Soy
template renderers) is injected into EmailArguments similarly to
VelocityRuntimeProvider.java. For technical reasons, a Soy template is
included, but is not used at this time. It does, however, provide a
simple example for how the email templates may look soon.

Feature: Issue 4345
Change-Id: I9625de1d129c04770d2a2dcfd4967c2c2779a81c
2016-08-22 09:45:33 -07:00
David Ostrovsky
29f95395d5 Plugin API: Provide custom manifest file
If no manifest file is specified, Buck's java_binary() rule merges the
content of manifest files from the dependant JARs into output
META/MANIFEST.MF. Normally we wouldn't care that it ends up with a lot
of mess, but unfortunately, it breaks the plugin-api.jar, with sealed
package exception, so we do care.

This happens because we provide the same package in multiple JARs, e.g.

  com.gerrit.server.project

is shipped with plugin-api.jar, obviously, but it happens that one file
Util.class, from the same package is shipped in the

  gerrit-acceptance-framework.jar

artifact. Normally it doesn't matter, unless a JAR is defined as sealed
in which case security violation exception is thrown during unit tests
execution.

To rectify this, we use the combination of custom manifest_file
attribute of java_binary() rule and passing non documented option from
this issue: [1] to ask Buck to not merge manifest files from the
dependant JARs.

With this fix, plugin unit tests executions in standalone build mode
work again.

* [1] https://github.com/facebook/buck/issues/86

Change-Id: I7b7571c20dcf6b54210b73760eccc8e699e6f1f6
2016-08-22 03:15:05 +00:00
David Pursehouse
3d191a2c9a Merge branch 'stable-2.13'
* stable-2.13:
  gerrit-plugin-api: Export gson as a dependency
  gerrit-plugin-api: Fix ordering of exported deps

Change-Id: Ie69f50f5ca7e2b9e963618c5a934aa4bb1b36df0
2016-08-21 20:32:43 +09:00
David Pursehouse
6a7c2d2252 gerrit-plugin-api: Export gson as a dependency
So it can be used in plugins without them having to define it
themselves (potentially with a different version).

Change-Id: Ibb15acdd75640cd18b21ad5ac5895fd164cebccd
2016-08-21 20:26:01 +09:00
David Pursehouse
571bf89ff6 gerrit-plugin-api: Fix ordering of exported deps
Change-Id: I01f02b8f780669a3ca8c4e279895a2f6a385d78c
2016-08-21 20:25:42 +09:00
Hugo Arès
02d2ed1d6b Set version to 2.14-SNAPSHOT
Change-Id: Id149cf6f80e2f18af2b8b9f00c05afbbc78d687e
2016-08-19 08:51:10 -04:00
David Pursehouse
d633834772 Merge branch 'stable-2.12'
* stable-2.12:
  ChangeIT: Assert that submitting a change doesn't remove non-voting reviewers
  Instead of deleting patch-set-approval set vote to zero
  ChangeIT#commitFooters: Fix setup of test labels
  CreateChangeIT: Fix flaky test
  Add a testing method to set the clock step used by TimeUtil
  Update issue tracker URL in documentation
  Update issue tracker URL in POM files

Change-Id: I991be7faf90cd37a8d664a0c951fea4c14f94492
2016-06-27 11:08:44 +09:00
Edwin Kempin
b644ff8fcf Merge "Implement Bazel build" 2016-06-24 10:51:33 +00:00
David Pursehouse
ff0569a68a Update issue tracker URL in POM files
Change-Id: Ib2130947709532ae3ded532e35f61d8a16c4e332
2016-06-23 06:47:46 +00:00
David Ostrovsky
2c69859559 Export prolog compiler in plugin API
Some plugins depend on prolog, e.g. gerrit-owners plugin, so we make it
available for the in tree plugin build mode.

Change-Id: Ieb3666281d00f62a219c0870b67f65d0a9ed0f0e
2016-06-22 07:38:21 +02: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
Saša Živkov
8e851435f1 Export blame-cache to gerrit-plugin-api
Change-Id: Ia806410bad8d1e82821a34d64e8d6a8af6c0beb8
2016-04-26 12:50:38 +00:00
David Ostrovsky
08ea694499 Buck: Remove jgit cell
Cross cell support in Buck is considered as experimental feature, with
number of open issues: [1], [2], [3].  Moreover, to make Maven Central
machinery work, it was needed to create symbolic links in source tree.
That broke `buck targets` feature.

Remove it for now, and re-consider to add it later.

[1] https://github.com/facebook/buck/issues/656
[2] https://github.com/facebook/buck/issues/658
[3] https://github.com/facebook/buck/issues/717

Bug: Issue 3954
Change-Id: Ic621a07771f926001df181b46b2169e214ce208a
2016-04-20 22:02:49 +02:00
David Pursehouse
1c6f71ef00 Add new maintainers to "developers" section in pom.xml files
Change-Id: I58fc08f80ed325dde7b15c1db8c3bde796ec135a
2016-03-15 13:35:49 +09:00
David Pursehouse
f4106227e4 Set version to 2.12.2
Change-Id: I2c829d1edfd39187554738a7f593feb1675e8d01
2016-03-10 12:42:51 +00:00
David Pursehouse
171f8e9f2d gerrit-plugin-api: Add jgit-servlet as an exported dependency
This will allow plugins to use the functionality without having
to explicitly declare a dependency.

Change-Id: I92aa3bb2e77deef433a7f1262d8ad5bda59dd83b
2016-03-04 10:03:08 +09:00
David Pursehouse
6475704ed2 Set version to 2.12.1
Change-Id: Ie696c7f4ecbd5e83422f29ce5f4b69bc3bd100cc
2016-03-02 12:27:45 +09:00