github plugin for gerrit build issue

1,043 views
Skip to first unread message

Nenad Vukicevic

unread,
Jan 21, 2014, 9:44:55 PM1/21/14
to repo-d...@googlegroups.com
I am trying to build a github plugin and ran into issues.  This is what I did:

# git clone https://gerrit.googlesource.com/plugins/github
# cd github
# mvn install
...
[ERROR] Failed to execute goal on project github-oauth: Could not resolve dependencies for project com.googlesource.gerrit.plugins.github:github-oauth:jar:2.8-SNAPSHOT: The following artifacts could not be resolved: com.google.gerrit:gerrit-plugin-api:jar:2.8-SNAPSHOT, org.kohsuke:github-api:jar:1.44-SNAPSHOT: Failure to find com.google.gerrit:gerrit-plugin-api:jar:2.8-SNAPSHOT in http://repo.jenkins-ci.org/public/ was cached in the local repository, resolution will not be reattempted until the update interval of repo.jenkins-ci.org has elapsed or updates are forced -> [Help 1]

Any idea?  Seems that gerrit moved from 2.8 development and 2.8-SNAPSHOT and 1.44-SNAPSHOT cannot be resolved.

Also, instructions on building singleusergroup are outdated as project switched from mvn to buck.


David Ostrovsky

unread,
Jan 22, 2014, 4:15:27 AM1/22/14
to repo-d...@googlegroups.com, repo-discuss

On Wednesday, January 22, 2014 3:44:55 AM UTC+1, Nenad Vukicevic wrote:
I am trying to build a github plugin and ran into issues.  This is what I did:

# git clone https://gerrit.googlesource.com/plugins/github
# cd github
# mvn install
...
[ERROR] Failed to execute goal on project github-oauth: Could not resolve dependencies for project com.googlesource.gerrit.plugins.github:github-oauth:jar:2.8-SNAPSHOT: The following artifacts could not be resolved: com.google.gerrit:gerrit-plugin-api:jar:2.8-SNAPSHOT, org.kohsuke:github-api:jar:1.44-SNAPSHOT: Failure to find com.google.gerrit:gerrit-plugin-api:jar:2.8-SNAPSHOT in http://repo.jenkins-ci.org/public/ was cached in the local repository, resolution will not be reattempted until the update interval of repo.jenkins-ci.org has elapsed or updates are forced -> [Help 1]

Any idea?  Seems that gerrit moved from 2.8 development and 2.8-SNAPSHOT and 1.44-SNAPSHOT cannot be resolved.


You have two unrelated problems: one with gerrit-plugin-api-2.8-SNAPSHOT and one with github-api-1.44-SNAPSHOT.

* gerrit-plugin-api: i guess you could replace 2.8-SNPASHOT with 2.8 and try again.
* github-api: clone this project and issue mvn clean install, to install it in your local Maven repository.

> Also, instructions on building singleusergroup are outdated as project switched from mvn to buck.
Well, it's open source, why not to fix the instructions and upload a change for review?

Luca Milanesio

unread,
Jan 22, 2014, 4:19:57 AM1/22/14
to Nenad Vukicevic, Repo and Gerrit Discussion
Hi Nenad,
there are quite some patches on top of master in order to fix some of the issues:

Have you tried to apply them ?
It currently builds and work fine for me on Gerrit 2.9.

There is not yet a stable-2.8 branch, will create it today so that I can change the SNAPSHOT to final ;-)

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/groups/opt_out.

Luca Milanesio

unread,
Jan 26, 2014, 2:27:13 PM1/26/14
to Nenad Vukicevic, Repo and Gerrit Discussion
If you want to build on Gerrit 2.8 released, I've created a stable-2.8 branch.

Try to fetch:
git fetch https://gerrit.googlesource.com/plugins/github refs/changes/36/54036/1 && git cherry-pick FETCH_HEAD

Luca.
 
On 26 Jan 2014, at 19:13, Luca Milanesio <luca.mi...@gmail.com> wrote:

Hi Nenad,
I found a problem on the master branch (one extra parameter in ChangeControl) and fixed it.

Try to fetch:
git fetch https://gerrit.googlesource.com/plugins/github refs/changes/35/54035/2 && git checkout FETCH_HEAD

... and build against 2.9-SNAPSHOT (current master).

HTH.

Luca.

On 26 Jan 2014, at 17:11, Nenad Vukicevic <nvuki...@gmail.com> wrote:

Luca, I got side tracked from this.  At the end I got the following errors:

[INFO] Gerrit Code Review - GitHub integration ........... SUCCESS [0.289s]
[INFO] Gerrit Code Review - GitHub OAuth login ........... SUCCESS [1.911s]
[INFO] Gerrit Code Review - GitHub plugin ................ FAILURE [1.122s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.505s
[INFO] Finished at: Sun Jan 26 09:09:23 PST 2014
[INFO] Final Memory: 33M/723M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project github-plugin: Compilation failure: Compilation failure:
[ERROR] /a/gerrit/github/github-plugin/src/main/java/com/googlesource/gerrit/plugins/github/InitGitHub.java:[55,2] error: method does not override or implement a method from a supertype
[ERROR] /a/gerrit/github/github-plugin/src/main/java/com/googlesrouce/gerrit/plugins/github/git/PullRequestCreateChange.java:[201,31] error: method create in interface Factory cannot be applied to given types;

I installed gerrit from the source tree (the latest, I guess that is 2.9).

Thanks in advance,
Nenad


On Wed, Jan 22, 2014 at 11:09 AM, Nenad Vukicevic <nvuki...@gmail.com> wrote:
I changed 1.48-SNAPSHOT to 1.49  for kohsuke and that worked.

Also, added gerritforge.com/snapshot as a repository and was able to resolve the other  issue.

Compiling now.



On Wed, Jan 22, 2014 at 11:07 AM, Nenad Vukicevic <nvuki...@gmail.com> wrote:
Luca, I applied changes, however still have issues:

[INFO] ------------------------------------------------------------------------
[INFO] Building Gerrit Code Review - GitHub OAuth login 2.8-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: http://repo.jenkins-ci.org/public/com/google/gerrit/gerrit-plugin-api/2.8-SNAPSHOT/maven-metadata.xml
Downloading: http://repo.jenkins-ci.org/public/com/google/gerrit/gerrit-plugin-api/2.8-SNAPSHOT/gerrit-plugin-api-2.8-SNAPSHOT.pom
[WARNING] The POM for com.google.gerrit:gerrit-plugin-api:jar:2.8-SNAPSHOT is missing, no dependency information available
Downloading: http://repo.jenkins-ci.org/public/org/kohsuke/github-api/1.48-SNAPSHOT/maven-metadata.xml
Downloading: http://repo.jenkins-ci.org/public/org/kohsuke/github-api/1.48-SNAPSHOT/github-api-1.48-SNAPSHOT.pom
[WARNING] The POM for org.kohsuke:github-api:jar:1.48-SNAPSHOT is missing, no dependency information available
Downloading: http://repo.jenkins-ci.org/public/com/google/gerrit/gerrit-plugin-api/2.8-SNAPSHOT/gerrit-plugin-api-2.8-SNAPSHOT.jar
Downloading: http://repo.jenkins-ci.org/public/org/kohsuke/github-api/1.48-SNAPSHOT/github-api-1.48-SNAPSHOT.jar

Note that the path:

http://repo.jenkins-ci.org/public/org/kohsuke/github-api/1.48-SNAPSHOT/github-api-1.48-SNAPSHOT.jar

does not exists. But, 1.49/github-api-1.49.jar does exist.

The other path

http://repo.jenkins-ci.org/public/com/google/gerrit/gerrit-plugin-api/2.8-SNAPSHOT/gerrit-plugin-api-2.8-SNAPSHOT.pom  does not exists at all.  Directory gerrit under google does not exists, like the whole thing was moved somewhere else:

http://repo.jenkins-ci.org/public/com/google/gerrit/

Thanks for your help.

Nenad



Luca Milanesio

unread,
Jan 26, 2014, 2:28:21 PM1/26/14
to Nenad Vukicevic, Repo and Gerrit Discussion
Stable-2.8 branch crated :-)

Luca.

Kang Jin Chia

unread,
Jan 29, 2014, 3:15:34 AM1/29/14
to repo-d...@googlegroups.com, Nenad Vukicevic
Hi Luca,

I am trying to build the github plugin and ran into the same issue encountered here so I tried switching to the stable branch you created. However it seems that the same problems still occur:

[ERROR] Failed to execute goal on project github-oauth: Could not resolve dependencies for project com.googlesource.gerrit.plugins.github:github-oauth:jar:2.8-SNAPSHOT: The following artifacts could not be resolved: com.google.gerrit:gerrit-plugin-api:jar:2.8-SNAPSHOT, org.kohsuke:github-api:jar:1.44-SNAPSHOT: Failure to find com.google.gerrit:gerrit-plugin-api:jar:2.8-SNAPSHOT in http://repo.jenkins-ci.org/public/ was cached in the local repository, resolution will not be reattempted until the update interval of repo.jenkins-ci.org has elapsed or updates are forced -> [Help 1]

I'm not familiar with maven (first time trying to build a project), but it seems that github-plugin/pom.xml and github-oauth/pom.xml still have 2.8-SNAPSHOT listed as the version? I tried changing both to 2.8 but same error as well at any rate.

Would love to be able try this plugin out, any stable version would do.

Luca Milanesio

unread,
Jan 29, 2014, 3:46:33 AM1/29/14
to Kang Jin Chia, repo-discuss, Nenad Vukicevic
Hi Kang,

I've pushed a further patch [1] for using the GerritForge maven repository.
Alternatively you can build Gerrit locally and you would have your dependencies resolved.

With regards to the Kohsuke GitHub API, you need to build them from the Kohsuke GitHub repository in [2].

HTH.

Luca.

Nathan Nutter

unread,
Jan 29, 2014, 3:52:16 AM1/29/14
to Luca Milanesio, Kang Jin Chia, repo-discuss, Nenad Vukicevic
The README.md still says to use https://github.com/lucamilanesio/github-api.

Nathan Nutter

unread,
Jan 29, 2014, 4:23:59 AM1/29/14
to Luca Milanesio, Kang Jin Chia, repo-discuss, Nenad Vukicevic
I tried going through the whole process again, a fairly accurate work log:

https://gist.github.com/nnutter/8684238

I had to make several changes:

gerrit diff: https://gist.github.com/nnutter/8684271
singleusergroup diff: https://gist.github.com/nnutter/8684277
github diff: https://gist.github.com/nnutter/8684261

And I still ended up with the same error I reported previously (http://j.mp/1fbQyRx):

https://gist.github.com/nnutter/8684215

I'll mention that kohsuke github-api 1.44 is *not* compatible because it is missing GHPullRequestCommitDetail (but 1.45 has it). lucamilanesio's fork's pom.xml sets the version as 1.48-SNAPSHOT.

David Ostrovsky

unread,
Jan 29, 2014, 4:51:40 AM1/29/14
to repo-d...@googlegroups.com, Luca Milanesio, Kang Jin Chia, Nenad Vukicevic, repo-discuss

On Wednesday, January 29, 2014 10:23:59 AM UTC+1, nnutter wrote:
I tried going through the whole process again, a fairly accurate work log:

https://gist.github.com/nnutter/8684238

I had to make several changes:

gerrit diff: https://gist.github.com/nnutter/8684271

Thanks for the log! May be worth back porting this to 2.8 [1]?
Can you verify that this fixes buck build plugin_api for you on 2.8?


Nathan Nutter

unread,
Jan 29, 2014, 7:26:57 PM1/29/14
to David Ostrovsky, repo-discuss, Luca Milanesio, Kang Jin Chia, Nenad Vukicevic
Yep that worked. I made a new user (so fresh local maven repo, etc.) and did:

$ git clone https://gerrit.googlesource.com/gerrit
$ git checkout stable-2.8
$ git cherry-pick dcc48b078f73040f361a8b515342832eba0fc131
$ buck build api
...
/home/vagrant2/bin/buck: line 51: 1872 Killed java $BUCK_JAVA_ARGS -classpath $BUCK_JAVA_CLASSPATH com.facebook.buck.cli.Main "$@"

$ buck build api
[-] PARSING BUILD FILES...FINISHED 2.2s
[-] BUILDING...FINISHED 20.6s
Log:

$ buck build api_install
[-] PARSING BUILD FILES...FINISHED 2.2s
[-] BUILDING...FINISHED 27.7s

I think the first `buck build api` got killed for memory. I'm just using a low memory VM.
Reply all
Reply to author
Forward
0 new messages