blob: b2680638c06c96adf2eb69d1087cb7fbbd1b8846 [file] [log] [blame]
James Melvindba15502017-02-02 15:47:00 -07001Bazel Build
2===========
Martin Fickf46a09a2016-11-14 13:13:08 -07003
James Melvindba15502017-02-02 15:47:00 -07004This plugin can be built with Bazel
5
6
7Build standalone
8----------------
9
10To build all the example plugins, issue the following command:
11
12
13 bazel build :all
14
15
16The output for all the example plugins is created in
17
18
19 bazel-genfiles/all.zip
20
21
James Melvin6e707802017-02-10 15:54:54 -070022To build a specific example plugin, issue one of the following commands:
James Melvindba15502017-02-02 15:47:00 -070023
24
25 bazel build example-<example>
26
James Melvin6e707802017-02-10 15:54:54 -070027 OR
James Melvindba15502017-02-02 15:47:00 -070028
James Melvin6e707802017-02-10 15:54:54 -070029 cd example-<example> && bazel build example-<example>
30
31
32If the build command is run from the top-level example directory,
33the output for the example is created in
James Melvindba15502017-02-02 15:47:00 -070034
35
36 bazel-genfiles/example-<example>/example-<example>.jar
37
38
James Melvin6e707802017-02-10 15:54:54 -070039If the build command is run from inside a specific example directory,
40the output for the example is created in
41
42
43 example-<example>/bazel-genfiles/example-<example>.jar
44
45
James Melvindba15502017-02-02 15:47:00 -070046
Nasser Grainawi17829da2019-05-06 18:53:29 -060047Maven Build
James Melvindba15502017-02-02 15:47:00 -070048==========
49
Martin Fickf46a09a2016-11-14 13:13:08 -070050Note that for compatibility reasons a Maven build is provided, but is considered
51to be deprecated and will be removed in a future version of this plugin.
52
53To build with Maven, change directory to the specific example plugin folder and
54issue the command:
55
56
57 mvn clean package
58
59
60When building with Maven, the Gerrit Plugin API must be available.
61
62How to build the Gerrit Plugin API is described in the Gerrit
Nasser Grainawi17829da2019-05-06 18:53:29 -060063documentation (../../../Documentation/dev-bazel.html#_extension_and_plugin_api_jar_files).