Update for current version of Gerrit The plugin API is still in flux - update to work with current changes. Signed-off-by: Brad Larson <bklarson@gmail.com> Change-Id: Ia309c9827eb0f4970d21a437999a1468da4691e9
diff --git a/pom.xml b/pom.xml index cb14b14..da48be5 100644 --- a/pom.xml +++ b/pom.xml
@@ -24,7 +24,8 @@ <packaging>jar</packaging> <version>0.1</version> <properties> - <gerrit-version>2.4-rc0-139-gcaccf0f</gerrit-version> + <Gerrit-ApiType>plugin</Gerrit-ApiType> + <Gerrit-ApiVersion>2.5-SNAPSHOT</Gerrit-ApiVersion> </properties> <name>Hello World Gerrit Plugin</name> <url>https://gerrit-review.googlesource.com</url> @@ -50,10 +51,13 @@ <configuration> <archive> <manifestEntries> - <Gerrit-Plugin>helloworld</Gerrit-Plugin> <Gerrit-SshModule>com.google.gerrit.plugins.HelloWorldCommandModule</Gerrit-SshModule> - <Gerrit-Version>${gerrit-version}</Gerrit-Version> + + <Implementation-Title>Plugin ${project.artifactId}</Implementation-Title> <Implementation-Version>${project.version}</Implementation-Version> + + <Gerrit-ApiType>${Gerrit-ApiType}</Gerrit-ApiType> + <Gerrit-ApiVersion>${Gerrit-ApiVersion}</Gerrit-ApiVersion> </manifestEntries> </archive> </configuration> @@ -65,7 +69,7 @@ <dependency> <groupId>com.google.gerrit</groupId> <artifactId>gerrit-plugin-api</artifactId> - <version>${gerrit-version}</version> + <version>${Gerrit-ApiVersion}</version> </dependency> </dependencies>
diff --git a/src/main/java/com/google/gerrit/plugins/HelloWorldCommandModule.java b/src/main/java/com/google/gerrit/plugins/HelloWorldCommandModule.java index 4e52cbd..770c6f3 100644 --- a/src/main/java/com/google/gerrit/plugins/HelloWorldCommandModule.java +++ b/src/main/java/com/google/gerrit/plugins/HelloWorldCommandModule.java
@@ -14,10 +14,11 @@ package com.google.gerrit.plugins; -import com.google.gerrit.sshd.commands.PluginCommandModule; +import com.google.gerrit.sshd.PluginCommandModule; public class HelloWorldCommandModule extends PluginCommandModule { - public void configureCommands() { + @Override + protected void configureCommands() { command("print").to(PrintHelloWorldCommand.class); } }