On 10/29/2013 11:28 PM, yetanotherion wrote:>
> [...]
>
Please send mails to the repo-discuss group, rather than directly to me.
You're likely to get a quicker response.
> To do so, I checked out the source code
> % git clone --recursive
https://gerrit.googlesource.com/gerrit
> % cd gerrit
> % git checkout -b 2.6 origin/stable-2.6
When you clone the repository, it by default checks out the master
branch and the associated plugin revisions from the master branch.
When you switch to stable-2.6 with `git checkout -b 2.6
origin/stable-2.6` the submodules are not automatically updated. You
can see this from the output:
$ git checkout -b 2.6 origin/stable-2.6
warning: unable to rmdir plugins/cookbook-plugin: Directory not empty
warning: unable to rmdir plugins/download-commands: Directory not empty
M plugins/commit-message-length-validator
M plugins/replication
M plugins/reviewnotes
Branch 2.6 set up to track remote branch stable-2.6 from origin.
Switched to a new branch '2.6'
And from git status:
$ git status
# On branch 2.6
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working
directory)
#
# modified: plugins/commit-message-length-validator (new commits)
# modified: plugins/replication (new commits)
# modified: plugins/reviewnotes (new commits)
#
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# plugins/cookbook-plugin/
# plugins/download-commands/
To set the plugins to the correct revisions for stable-2.6 you need to
run `git submodule update`:
$ git submodule update
Submodule path 'plugins/commit-message-length-validator': checked out
'a2aaf1a0151959e69e8f578d2f60f6a608052e9a'
Submodule path 'plugins/replication': checked out
'e7b4bce71dabfe1cc2115b00791607e68d61acb8'
Submodule path 'plugins/reviewnotes': checked out
'5fd0585ece92abfb3f31b82d3e3846b33f161fff'
I don't see that mentioned in your steps listed above. Did you not do
that, or just didn't include it in the steps that you listed?
> and when building
> % mvn -U clean package
> obtained,
>
> [ERROR] Failed to execute goal on project gerrit-war: Could not resolve
> dependencies for project com.google.gerrit:gerrit-war:war:2.6: The
> following artifacts could not be resolved:
> com.googlesource.gerrit.plugins.replication:replication:jar:2.6,
> com.googlesource.gerrit.plugins.reviewnotes:reviewnotes:jar:2.6,
>
com.googlesource.gerrit.plugins.validators:commit-message-length-validator:jar:2.6:
> Could not find artifact
> com.googlesource.gerrit.plugins.replication:replication:jar:2.6 in
Assuming you've got the correct plugin revisions checked out, does it
actually build them? It should list out all the modules being built:
[...]
[INFO] replication
[INFO] reviewnotes
[INFO] commit-message-length-validator
And if it builds them, have you checked that it's building them with
revision 2.6 and placing them in your local maven repository?
Have you tried with `install` rather than `package` on the mvn command?
I don't have a working Maven environment any more (we've moved to
building with buck on the master branch) so I can't run the build and
check what it's doing right now.
> The plugins do not seem to build in 2.6. So my questions are the following:
> a) could we develop such a plugin in 2.6 ?
> b) if not, in which version should we develop it, hoping that it would
> be compatible with gerrit 2.6 (our prod instance runs on 2.6).
>
If you want to run plugins on 2.6 you'll have to develop against the 2.6
API.