Merge branch 'stable-2.10'
* stable-2.10:
Buck: Fix build
Reuse documentation provided by its-base
Merge made by the 'ours' strategy.
Change-Id: I76c269f40bc75d947d50f552ff3075c45d183ff0
diff --git a/BUCK b/BUCK
index fd0018a..b866bf6 100644
--- a/BUCK
+++ b/BUCK
@@ -3,11 +3,10 @@
srcs = glob(['src/main/java/**/*.java']),
resources = glob(['src/main/resources/**/*']),
manifest_entries = [
- 'Gerrit-PluginName: its-bugzilla',
'Gerrit-Module: com.googlesource.gerrit.plugins.hooks.bz.BugzillaModule',
'Gerrit-InitStep: com.googlesource.gerrit.plugins.hooks.bz.InitBugzilla',
'Gerrit-ReloadMode: reload',
- 'Implementation-Title: Plugin its-bugzilla',
+ 'Implementation-Title: Bugzilla ITS Plugin',
'Implementation-URL: https://www.wikimediafoundation.org',
],
deps = [
@@ -19,19 +18,22 @@
def strip_jar(
name,
src,
- excludes):
- stripped = name + '.zip'
+ excludes = [],
+ visibility = [],
+ ):
+ name_zip = name + '.zip'
genrule(
- name = stripped,
- cmd = 'cp $(location %s) $OUT;' % src +
- 'zip -qd $OUT ' +
- ' '.join(excludes),
- out = stripped,
+ name = name_zip,
+ cmd = 'cp $SRCS $OUT && zip -qd $OUT ' + ' '.join(excludes),
+ srcs = [ src ],
+ deps = [ src ],
+ out = name_zip,
+ visibility = visibility,
)
-
prebuilt_jar(
name = name,
- binary_jar = ':' + stripped,
+ binary_jar = ':' + name_zip,
+ visibility = visibility,
)
strip_jar(
diff --git a/pom.xml b/pom.xml
index 720f534..a1613ff 100644
--- a/pom.xml
+++ b/pom.xml
@@ -21,7 +21,7 @@
<groupId>com.googlesource.gerrit.plugins.bugzilla</groupId>
<artifactId>its-bugzilla</artifactId>
- <version>2.10</version>
+ <version>2.11-SNAPSHOT</version>
<name>Gerrit - Bugzilla support</name>
@@ -29,7 +29,6 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<Gerrit-ApiType>plugin</Gerrit-ApiType>
<Gerrit-ReloadMode>reload</Gerrit-ReloadMode>
- <Gerrit-PluginName>its-bugzilla</Gerrit-PluginName>
<Gerrit-InitStep>com.googlesource.gerrit.plugins.hooks.bz.InitBugzilla</Gerrit-InitStep>
<Gerrit-Module>com.googlesource.gerrit.plugins.hooks.bz.BugzillaModule</Gerrit-Module>
<easymockVersion>3.0</easymockVersion>
@@ -70,12 +69,11 @@
<manifestEntries>
<Implementation-Vendor>Wikimedia Foundation, Inc.</Implementation-Vendor>
<Implementation-URL>https://www.wikimediafoundation.org/</Implementation-URL>
- <Implementation-Title>Plugin ${project.artifactId}</Implementation-Title>
+ <Implementation-Title>Bugzilla ITS Plugin</Implementation-Title>
<Implementation-Version>${project.version}</Implementation-Version>
<Gerrit-ApiType>${Gerrit-ApiType}</Gerrit-ApiType>
<Gerrit-ApiVersion>${project.version}</Gerrit-ApiVersion>
<Gerrit-ReloadMode>${Gerrit-ReloadMode}</Gerrit-ReloadMode>
- <Gerrit-PluginName>${Gerrit-PluginName}</Gerrit-PluginName>
<Gerrit-InitStep>${Gerrit-InitStep}</Gerrit-InitStep>
<Gerrit-Module>${Gerrit-Module}</Gerrit-Module>
</manifestEntries>
diff --git a/src/main/java/com/googlesource/gerrit/plugins/hooks/bz/InitBugzilla.java b/src/main/java/com/googlesource/gerrit/plugins/hooks/bz/InitBugzilla.java
index 61156e9..e9175da 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/hooks/bz/InitBugzilla.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/hooks/bz/InitBugzilla.java
@@ -15,11 +15,11 @@
package com.googlesource.gerrit.plugins.hooks.bz;
import com.google.gerrit.extensions.annotations.PluginName;
-import com.google.gerrit.pgm.init.AllProjectsConfig;
-import com.google.gerrit.pgm.init.AllProjectsNameOnInitProvider;
-import com.google.gerrit.pgm.init.InitFlags;
-import com.google.gerrit.pgm.init.Section;
-import com.google.gerrit.pgm.util.ConsoleUI;
+import com.google.gerrit.pgm.init.api.AllProjectsConfig;
+import com.google.gerrit.pgm.init.api.AllProjectsNameOnInitProvider;
+import com.google.gerrit.pgm.init.api.InitFlags;
+import com.google.gerrit.pgm.init.api.Section;
+import com.google.gerrit.pgm.init.api.ConsoleUI;
import com.google.inject.Inject;
import com.google.inject.Singleton;
diff --git a/src/main/resources/Documentation/build.md b/src/main/resources/Documentation/build.md
index 755d11d..34b36bb 100644
--- a/src/main/resources/Documentation/build.md
+++ b/src/main/resources/Documentation/build.md
@@ -1,19 +1,24 @@
Build
=====
-This plugin is built with Buck.
+This @PLUGIN@ plugin is built with Buck.
-Clone or link this plugin and the its-base plugin to the plugins directory
-of Gerrit's source tree, and issue the command:
+Clone (or link) both this plugin and also
+[plugins/its-base](https://gerrit-review.googlesource.com/#/admin/projects/plugins/its-base)
+to the `plugins` directory of Gerrit's source tree.
+
+Then issue
```
- buck build plugins/its-bugzilla
+ buck build plugins/@PLUGIN@
```
+in the root of Gerrit's source tree to build
+
The output is created in
```
- buck-out/gen/plugins/its-bugzilla/its-bugzilla.jar
+ buck-out/gen/plugins/@PLUGIN@/@PLUGIN@.jar
```
This project can be imported into the Eclipse IDE:
@@ -25,11 +30,12 @@
To execute the tests run:
```
- buck test --all --include its-bugzilla
+ buck test --all --include @PLUGIN@
```
-Note that for compatibility reasons a Maven build is provided, but is considered
-to be deprecated and will be removed in a future version of this plugin.
+Note that for compatibility reasons a Maven build is provided, but is
+considered to be deprecated and will be removed in a future version of
+this plugin.
To build with Maven, change directory to the plugin folder and issue the
command:
@@ -45,4 +51,4 @@
[Back to @PLUGIN@ documentation index][index]
-[index]: index.html
+[index]: index.html
\ No newline at end of file