Fix gerrit-extension-api-X.Y-all-sources.jar

The Maven artifact gerrit-extension-api-X.Y-all-sources.jar that
should contain the sources of the gerrit-extension-api doesn't contain
any source from the com.google.gerrit.extensions package. Configuring
the Maven plugin 'maven-source-plugin' fixes this.

Change-Id: I4493328a804b45ecd93d0dbf259397ab79182810
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
Skip non-commits when verifying access for 'add branch' operation

Some projects have refs pointing to a tree (e.g., the Linux kernel's
"refs/tags/v2.6.11"), resulting in the message

 Cannot verify permissions to commit object <commit id> in repository <repo>

as a result of exception

 IncorrectObjectTypeException: Object <tree id> is not a commit.
	at org.eclipse.jgit.revwalk.RevWalk.parseCommit(RevWalk.java:724)
	at com.google.gerrit.server.project.ProjectControl.canReadCommit(ProjectControl.java:496)
	at com.google.gerrit.server.project.RefControl.canCreate(RefControl.java:250)
	at com.google.gerrit.server.git.ReceiveCommits.parseCreate(ReceiveCommits.java:852)

when trying to create a new branch through gerrit.

Change-Id: I9be1fe5046b5db482aa8f80d02c86d3d7a973036
Merge "Skip non-commits when verifying access for 'add branch' operation" into stable-2.6
Merge "Fix gerrit-extension-api-X.Y-all-sources.jar" into stable-2.6
Generate javadoc for gerrit extension and plugin API

To make the consumption of the gerrit extension and plugin API easier
for plugin developers gerrit-extension-api.jar and
gerrit-plugin-api.jar should be published to Maven central. For this
having javadocs generated is required.

Change-Id: Ibb13fbb61c94c76fe6e2f7041d5a1e269d39d788
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
Merge branch 'stable-2.6' into 'stable-2.7'

* stable-2.6:
  Skip non-commits when verifying access for 'add branch' operation
  Fix gerrit-extension-api-X.Y-all-sources.jar

Change-Id: I937e595e6fef942763dd5dd4e1436212d8b6ae3b
Prevent expansion when whole file isn't loaded

This prevents attempting to expand lines which aren't returned by
the SparseFileContents in the event the whole file hasn't been
loaded.  This can happen any time syntax highlighting is off (and
the whole file context isn't selected), or when the file is huge
(>9000 lines).  Since a huge file disables syntax highlighting and
forces a maximum of 25 lines context, it doesn't make sense to
taunt the user with lines they can't see.

Bug: Issue 1233
Change-Id: I3dc58e934da20f63a1f23d764f50abb5230ed1ee
Merge branch 'stable-2.6' into stable-2.7

* stable-2.6:
  Prevent expansion when whole file isn't loaded
  Generate javadoc for gerrit extension and plugin API
Fix javadoc generation for gerrit extension and plugin API

It was a bad idea to use the maven-dependency-plugin to unpack the
sources for the javadoc generation as this plugin needs to download
the source artifact from a Maven repository. At this point in time the
source artifact only exists in the local target folder but is not yet
installed into a Maven repository. Instead we are now using the
maven-antrun-plugin to unzip the local source artifact.

Change-Id: I37a7f2e214a395f0c64fbe8001655ed842bab01f
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
Merge branch 'stable-2.6' into stable-2.7

* stable-2.6:
  Fix javadoc generation for gerrit extension and plugin API
Skip internal logging conf when external one was provided

Gerrit's internal error and gc logging configuration was overriding
log4j configuration provided by -Dlog4j.configuration parameter. Now
when such parameter is present Gerrit will not call internal log
configuration but will relay on external one.

Change-Id: I8c808d6d4eee93480bcda138ed305288f5baaa39
Signed-off-by: Dariusz Luksza <dariusz@luksza.org>
Use LogManager.DEFAULT_CONFIGURATION_KEY

Change-Id: I477fe6b6f55aadecfa24019b97b5d8f5afb4063d
Merge branch 'stable-2.6' into stable-2.7

* stable-2.6:
  Use LogManager.DEFAULT_CONFIGURATION_KEY
  Skip internal logging conf when external one was provided
Fix: Review comments do not show up for unchanged files

When comparing patch sets and some comment was put in one side,
that comment is not shown if there is not any code changed between
the two patch sets, Gerrit only say "No Differences", thus there's a
risk that this comment would been ignored.

Bug: issue 2122
Change-Id: Ib56475c2bc0114feffe64883708652baa7be9d1e
Sync release notes from master

The release notes on master were updated to use links to the new
download site, but those updates were not reflected on the
stable-2.6 branch.

Also the release note for 2.6.1 is missing on stable-2.6, but
instead the release note for 2.6.2 (which does not exist) is
there.  And there are several older release notes missing.

Sync the release notes from master to make them consistent.

Change-Id: I8facc676aeff754f092a5a9a7bf69345229a55f0
Merge branch 'stable-2.6' into stable-2.7

* stable-2.6:
  Sync release notes from master
  Fix: Review comments do not show up for unchanged files

Change-Id: I68828f7debf75e03956703acdf4a03e1462c3af9
Sync 2.7 release notes from master

The release notes were updated on the master branch, but did not
get synced the the 2.7 branch.  Release notes build from stable-2.7
are not up to date.

Change-Id: If581bc8283e37755b38f52a000ca501e4a769928
Get rid of JdbcSQLException while numbers are read from cache

Exception org.h2.jdbc.JdbcSQLException: Hexadecimal string with odd
number of characters: "0" is thrown when number with value 0 or string
with value "0" is stored in H2Cache and read is performed.
The fix modifies implementation so that Java de-serialization is
performed even for built-in (e.g. Integer) types.

Change-Id: I953487cb75b3712e8825a74613977425873507a1
Signed-off-by: Jacek Centkowski <geminica.programs@gmail.com>
Extend AddBranchResult with toString method implementation

When RpcAuditEvent is dispatched it contains servlet response
(AddBranchResult object). Meaningful toString method improves
readability in audit log.

Change-Id: I44c5f5a68126894b4aab7958f8a00d15974fec6f
Signed-off-by: Jacek Centkowski <jcentkowski@collab.net>
Bump JSch to 1.5.0 to fix Java7 compatibility

JSch has an issue where connections will fail intermittently when
running under Java 7.  This has been fixed in JSch 1.5.0.

Bug: Issue 2232
Change-Id: I62121fb731c24736ed79b836fb0ceb1372130951