Eclipse

Generating the Eclipse Project

Refreshing the Classpath

If an updated classpath is needed, the Eclipse project can be
refreshed and missing dependency JARs can be downloaded by running
project.py again. For IntelliJ, you need to click the Sync Project
with BUILD Files button of IntelliJ plugin.

The local.properties file may be placed in the root of the gerrit repository
being built, or in ~/.gerritcodereview/. The file in the root of the gerrit
repository has precedence.

Building against unpublished Maven JARs

To build against unpublished Maven JARs, like gwtorm or PrologCafe, the custom
JARs must be installed in the local Maven repository (mvn clean install) and
maven_jar() must be updated to point to the MAVEN_LOCAL Maven repository for
that artifact:

To consume the JGit dependency from the development tree, edit
lib/jgit/jgit.bzl setting LOCAL_JGIT_REPO to a directory holding a
JGit repository.

To accelerate builds, several caches are activated per default:

~/.gerritcodereview/bazel-cache/downloaded-artifacts

~/.gerritcodereview/bazel-cache/repository

~/.gerritcodereview/bazel-cache/cas

Currently none of these caches have a maximum size limit. See
this bazel issue for
details. Users should watch the cache sizes and clean them manually if
necessary.

NPM Binaries

Parts of the PolyGerrit build require running NPM-based JavaScript programs as
"binaries". We don’t attempt to resolve and download NPM dependencies at build
time, but instead use pre-built bundles of the NPM binary along with all its
dependencies. Some packages on
registry.npmjs.org come with their
dependencies bundled, but this is the exception rather than the rule. More
commonly, to add a new binary to this list, you will need to bundle the binary
yourself.

Note

We can only use binaries that meet certain licensing requirements, and that do
not include any native code.

Start by checking that the license and file types of the bundle are acceptable:

This will output a list of the different licenses used by the package and all
its transitive dependencies. We can only legally distribute a bundle via our
storage bucket if the licenses allow us to do so. As long as all of the listed
license are allowed by
Google’s
standards. Any by_exception_only, commercial, prohibited, or unlisted
licenses are not allowed; otherwise, it is ok to distribute the source. If in
doubt, contact a maintainer who is a Googler.