Building its-jira plugin for Gerrit 2.9/2.9.1

754 views
Skip to first unread message

Derek Nguyen

unread,
Oct 3, 2014, 4:52:29 PM10/3/14
to repo-d...@googlegroups.com
Hello,

Does anyone have instructions for building the its-jira plugin for Gerrit 2.9/2.9.1?

I'm trying to build on Ubuntu 12.04.

I've tried some instructions I found online which indicate that the Gerrit api plugin needs to be built first but it fails on the api_install step.  Here are steps I found online but keep failing during the "buck build api_install" step:

git clone --recursive -b stable-2.9 https://gerrit.googlesource.com/gerrit gerrit_recursive
cd gerrit
buck build api
buck build api_install
clone or link the its-base and its-jira plugins into the "plugins" directory
buck build plugins:its-base:its-base
buck build plugins:its-jira:its-jira

The failure message at "buck build api_install" is:
install command failed: Command '['mvn', 'install:install-file', '-Dversion=2.9.1', '-DpomFile=/home/gerrit2/repos/clean/gerrit/gerrit-extension-api/pom.xml', '-Dpackaging=jar', '-Dfile=/home/gerrit2/repos/clean/gerrit/buck-out/gen/gerrit-extension-api/extension-api.jar']' returned non-zero exit status 1
BUILD FAILED: //tools/maven:api_install failed with exit code 1:
OUT=/home/gerrit2/repos/clean/gerrit/buck-out/gen/tools/maven/api_install.info /bin/bash -e -c 'PYTHONPATH=/home/gerrit2/repos/clean/gerrit/./buck-out/gen/tools/__pylib_util python /home/gerrit2/repos/clean/gerrit/tools/maven/mvn.py -v 2.9.1 -o $OUT -s gerrit-extension-api:jar:/home/gerrit2/repos/clean/gerrit/buck-out/gen/gerrit-extension-api/extension-api.jar -s gerrit-plugin-gwtui:jar:/home/gerrit2/repos/clean/gerrit/buck-out/gen/gerrit-plugin-gwtui/gwtui-api.jar -s gerrit-plugin-api:jar:/home/gerrit2/repos/clean/gerrit/buck-out/gen/gerrit-plugin-api/plugin-api.jar -s gerrit-extension-api:java-source:/home/gerrit2/repos/clean/gerrit/buck-out/gen/gerrit-extension-api/lib__extension-api-src__output/extension-api-src.jar -s gerrit-plugin-gwtui:java-source:/home/gerrit2/repos/clean/gerrit/buck-out/gen/gerrit-plugin-gwtui/gwtui-api-src.jar -s gerrit-plugin-api:java-source:/home/gerrit2/repos/clean/gerrit/buck-out/gen/gerrit-plugin-api/plugin-api-src.jar -s gerrit-extension-api:javadoc:/home/gerrit2/repos/clean/gerrit/buck-out/gen/gerrit-extension-api/extension-api-javadoc.jar -s gerrit-plugin-gwtui:javadoc:/home/gerrit2/repos/clean/gerrit/buck-out/gen/gerrit-plugin-gwtui/gwtui-api-javadoc.jar -s gerrit-plugin-api:javadoc:/home/gerrit2/repos/clean/gerrit/buck-out/gen/gerrit-plugin-api/plugin-api-javadoc.jar -a install'

Thanks,
Derek

Luca Milanesio

unread,
Oct 6, 2014, 5:19:16 AM10/6/14
to Derek Nguyen, repo-d...@googlegroups.com
Hi Derek,
there is no need for you to build the Gerrit api as they are available on Maven Central.

Just build its-base and its-jira or alternatively you can download a pre-built version at:

HTH

Luca.

--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Derek Nguyen

unread,
Oct 6, 2014, 7:20:16 PM10/6/14
to repo-d...@googlegroups.com, dere...@gmail.com
Hi Luca,

Thanks for the info.  It looks like the pre-builts at that Jenkins location are based on "master".

I'm able to build its-base and its-jira for the master branch but when I try to initialize Gerrit again to setup the plugins (java -jar gerrit.war init -d review_site), I get an error I believe when it starts trying to configure the plugin:

Install plugin singleusergroup version v2.9.1 [y/N]?
Exception in thread "main" java.lang.NoClassDefFoundError: com/google/gerrit/pgm/init/api/InitStep
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
    at com.google.gerrit.pgm.init.InitPluginStepsLoader.loadInitStep(InitPluginStepsLoader.java:81)
    at com.google.gerrit.pgm.init.InitPluginStepsLoader.getInitSteps(InitPluginStepsLoader.java:60)
    at com.google.gerrit.pgm.init.InitPlugins.initPlugins(InitPlugins.java:151)
    at com.google.gerrit.pgm.init.InitPlugins.run(InitPlugins.java:99)
    at com.google.gerrit.pgm.init.SitePathInitializer.run(SitePathInitializer.java:82)
    at com.google.gerrit.pgm.BaseInit.run(BaseInit.java:108)
    at com.google.gerrit.pgm.util.AbstractProgram.main(AbstractProgram.java:63)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at com.google.gerrit.launcher.GerritLauncher.invokeProgram(GerritLauncher.java:166)
    at com.google.gerrit.launcher.GerritLauncher.mainImpl(GerritLauncher.java:93)
    at com.google.gerrit.launcher.GerritLauncher.main(GerritLauncher.java:50)
    at Main.main(Main.java:25)
Caused by: java.lang.ClassNotFoundException: com.google.gerrit.pgm.init.api.InitStep
    at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
    ... 37 more


I've searched Google but couldn't find any tips.

Thanks,
Derek

David Ostrovsky

unread,
Oct 7, 2014, 5:25:00 AM10/7/14
to repo-d...@googlegroups.com, dere...@gmail.com

Am Dienstag, 7. Oktober 2014 01:20:16 UTC+2 schrieb Derek Nguyen:
Hi Luca,

Thanks for the info.  It looks like the pre-builts at that Jenkins location are based on "master".

I'm able to build its-base and its-jira for the master branch but when I try to initialize Gerrit again to setup the plugins (java -jar gerrit.war init -d review_site), I get an error I believe when it starts trying to configure the plugin:

Install plugin singleusergroup version v2.9.1 [y/N]?
Exception in thread "main" java.lang.NoClassDefFoundError: com/google/gerrit/pgm/init/api/InitStep

You can't build for master and deploy on Gerrit 2.9 (or older).
This specific package was moved in this change [1].


Luca Milanesio

unread,
Oct 7, 2014, 5:45:07 AM10/7/14
to David Ostrovsky, repo-d...@googlegroups.com, dere...@gmail.com
It seems we need a stable-2.9 branch for the ITS-* related stuff :-)

Will create it right now, push it and make a CI build for it.
Let's see then if that works and what we need in terms of fixes to make it work :-)

Luca.

Luca Milanesio

unread,
Oct 7, 2014, 6:42:22 AM10/7/14
to David Ostrovsky, repo-d...@googlegroups.com, dere...@gmail.com
its-base / stable-2.9 branch created and build is passing :-)

Now I'll go with the corresponding commit IDs on its-jira, its-rtc and its-bugzilla.

Luca.

lucamilanesio

unread,
Oct 7, 2014, 1:33:42 PM10/7/14
to repo-d...@googlegroups.com, david.o...@gmail.com, dere...@gmail.com
its-jira / stable-2.9 branch created and built.

See the plugins for 2.9 on:

Can you download it and try it out on a Gerrit 2.9?

Luca.


On Tuesday, October 7, 2014 11:42:22 AM UTC+1, lucamilanesio wrote:
its-base / stable-2.9 branch created and build is passing :-)

Now I'll go with the corresponding commit IDs on its-jira, its-rtc and its-bugzilla.

Luca.
On 7 Oct 2014, at 10:44, Luca Milanesio <luca.mi...@gmail.com> wrote:

It seems we need a stable-2.9 branch for the ITS-* related stuff :-)

Will create it right now, push it and make a CI build for it.
Let's see then if that works and what we need in terms of fixes to make it work :-)

Luca.
On 7 Oct 2014, at 10:25, David Ostrovsky <david.o...@gmail.com> wrote:


Am Dienstag, 7. Oktober 2014 01:20:16 UTC+2 schrieb Derek Nguyen:
Hi Luca,

Thanks for the info.  It looks like the pre-builts at that Jenkins location are based on "master".

I'm able to build its-base and its-jira for the master branch but when I try to initialize Gerrit again to setup the plugins (java -jar gerrit.war init -d review_site), I get an error I believe when it starts trying to configure the plugin:

Install plugin singleusergroup version v2.9.1 [y/N]?
Exception in thread "main" java.lang.NoClassDefFoundError: com/google/gerrit/pgm/init/api/InitStep

You can't build for master and deploy on Gerrit 2.9 (or older).
This specific package was moved in this change [1].



--
--

More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss+unsubscribe@googlegroups.com.

Derek Nguyen

unread,
Oct 7, 2014, 5:06:36 PM10/7/14
to repo-d...@googlegroups.com, david.o...@gmail.com, dere...@gmail.com
Hi Luca,

I was able to install and initialize the plugins from the stable-2.9 Jenkins' jobs.

Thanks for the awesome support!

Derek
To unsubscribe, email repo-discuss...@googlegroups.com

More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages