Merge "Add helloworld print docs"
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..fb96bc0
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,5 @@
+/target
+/.classpath
+/.settings
+/.project
+
diff --git a/pom.xml b/pom.xml
index 8f94171..f1df7e1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -24,39 +24,44 @@
<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>
-
- <description>
- A hello world-type plugin example for Gerrit
- </description>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <version>2.4</version>
+ <configuration>
+ <archive>
+ <manifestEntries>
+ <Gerrit-SshModule>com.google.gerrit.plugins.HelloWorldCommandModule</Gerrit-SshModule>
+
+ <Implementation-Vendor>Gerrit Code Review</Implementation-Vendor>
+ <Implementation-URL>http://code.google.com/p/gerrit/</Implementation-URL>
+
+ <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>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
+ <version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <configuration>
- <archive>
- <manifestEntries>
- <Gerrit-Plugin>helloworld</Gerrit-Plugin>
- <Gerrit-SshModule>com.google.gerrit.plugins.HelloWorldCommandModule</Gerrit-SshModule>
- <Gerrit-Version>${gerrit-version}</Gerrit-Version>
- </manifestEntries>
- </archive>
- </configuration>
- </plugin>
</plugins>
<resources>
<resource>
@@ -71,8 +76,9 @@
<dependencies>
<dependency>
<groupId>com.google.gerrit</groupId>
- <artifactId>gerrit-plugin-api</artifactId>
- <version>${gerrit-version}</version>
+ <artifactId>gerrit-${Gerrit-ApiType}-api</artifactId>
+ <version>${Gerrit-ApiVersion}</version>
+ <scope>provided</scope>
</dependency>
</dependencies>
@@ -82,5 +88,4 @@
<url>https://gerrit-api.commondatastorage.googleapis.com/snapshot/</url>
</repository>
</repositories>
-
</project>
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);
}
}