I was facing the same error with building plugins, I tried building the plugins from the top level of gerrit, but it seems to me that the plugins libraries was not built properly. I went through the relevant libraries and built/installed the relevant plugin artifacts, then went to the plugin code and modified the pom.xml to point to 2.6 instead of 2.6-SNAPSHOT, and it worked. Here what I did to make it work:
[1] Clone gerrit and checkout stable 2.6 branch
git checkout -b stable-2.6 remotes/origin/stable-2.6
You need to clone the code for the plugin and checkout "stable-2.6" branch which should be compatible with gerrit API libraries for 2.6
[2] Build and install plugin APIs and Artifacts
cd gerrit-plugin-api
mvn clean package install
---
cd ../gerrit-plugin-archetype
mvn clean package install
---
cd ../gerrit-plugin-js-archetype
mvn clean package install
[3] Modify the plugin pom.xml to point to 2.6 rather than 2.6-SNAPSHOT
<dependencies>
<dependency>
<groupId>com.google.gerrit</groupId>
<artifactId>gerrit-plugin-api</artifactId>
<version>2.6</version>
</dependency>
</dependencies>
Then the plugin was built successfully. I tried this with hooks-its and hooks-rtc plugins.
I hope this helps.
Regards
Bassem