| James Melvin | dba1550 | 2017-02-02 15:47:00 -0700 | [diff] [blame] | 1 | Bazel Build |
| 2 | =========== |
| Martin Fick | f46a09a | 2016-11-14 13:13:08 -0700 | [diff] [blame] | 3 | |
| James Melvin | dba1550 | 2017-02-02 15:47:00 -0700 | [diff] [blame] | 4 | This plugin can be built with Bazel |
| 5 | |
| 6 | |
| 7 | Build standalone |
| 8 | ---------------- |
| 9 | |
| 10 | To build all the example plugins, issue the following command: |
| 11 | |
| 12 | |
| 13 | bazel build :all |
| 14 | |
| 15 | |
| 16 | The output for all the example plugins is created in |
| 17 | |
| 18 | |
| 19 | bazel-genfiles/all.zip |
| 20 | |
| 21 | |
| James Melvin | 6e70780 | 2017-02-10 15:54:54 -0700 | [diff] [blame] | 22 | To build a specific example plugin, issue one of the following commands: |
| James Melvin | dba1550 | 2017-02-02 15:47:00 -0700 | [diff] [blame] | 23 | |
| 24 | |
| 25 | bazel build example-<example> |
| 26 | |
| James Melvin | 6e70780 | 2017-02-10 15:54:54 -0700 | [diff] [blame] | 27 | OR |
| James Melvin | dba1550 | 2017-02-02 15:47:00 -0700 | [diff] [blame] | 28 | |
| James Melvin | 6e70780 | 2017-02-10 15:54:54 -0700 | [diff] [blame] | 29 | cd example-<example> && bazel build example-<example> |
| 30 | |
| 31 | |
| 32 | If the build command is run from the top-level example directory, |
| 33 | the output for the example is created in |
| James Melvin | dba1550 | 2017-02-02 15:47:00 -0700 | [diff] [blame] | 34 | |
| 35 | |
| 36 | bazel-genfiles/example-<example>/example-<example>.jar |
| 37 | |
| 38 | |
| James Melvin | 6e70780 | 2017-02-10 15:54:54 -0700 | [diff] [blame] | 39 | If the build command is run from inside a specific example directory, |
| 40 | the output for the example is created in |
| 41 | |
| 42 | |
| 43 | example-<example>/bazel-genfiles/example-<example>.jar |
| 44 | |
| 45 | |
| James Melvin | dba1550 | 2017-02-02 15:47:00 -0700 | [diff] [blame] | 46 | |
| Nasser Grainawi | 17829da | 2019-05-06 18:53:29 -0600 | [diff] [blame] | 47 | Maven Build |
| James Melvin | dba1550 | 2017-02-02 15:47:00 -0700 | [diff] [blame] | 48 | ========== |
| 49 | |
| Martin Fick | f46a09a | 2016-11-14 13:13:08 -0700 | [diff] [blame] | 50 | Note that for compatibility reasons a Maven build is provided, but is considered |
| 51 | to be deprecated and will be removed in a future version of this plugin. |
| 52 | |
| 53 | To build with Maven, change directory to the specific example plugin folder and |
| 54 | issue the command: |
| 55 | |
| 56 | |
| 57 | mvn clean package |
| 58 | |
| 59 | |
| 60 | When building with Maven, the Gerrit Plugin API must be available. |
| 61 | |
| 62 | How to build the Gerrit Plugin API is described in the Gerrit |
| Nasser Grainawi | 17829da | 2019-05-06 18:53:29 -0600 | [diff] [blame] | 63 | documentation (../../../Documentation/dev-bazel.html#_extension_and_plugin_api_jar_files). |