blob: bdabd99788b75988bc82e0c801ae56deaa99e65e [file] [log] [blame]
Gerrit2 - Eclipse Setup
=======================
This document is about installing Gerrit into an Eclipse workspace
for development and debugging, especially with the GWT hosted
mode debugger.
You will need to have the GWT (Google Web Toolkit) SDK installed on
your system. A Java 5 or later SDK is also required to run GWT's
compiler and runtime.
GWT requires the Sun JDK (or OpenJDK). The GWT "hosted mode"
environment (Eclipse debugger or "make web-shell") does not work
under libgcj.
User Library
------------
Create a user library called `GWT`:
* Window > Preferences
* Java > Build Path > User Libraries
* New
* Name: `GWT`
* Add JARs...
* Select `gwt-user.jar` from the $(GWT_SDK) directory.
* Select `gwt-dev-$(OS).jar` from the $(GWT_SDK) directory.
Maven Plugin
------------
Install the Maven Integration plugins:
http://m2eclipse.codehaus.org/[m2eclipse]
Pre-Build
---------
Ensure jgit has been installed in your maven repository:
====
(cd ../jgit/jgit-maven/jgit/ && mvn install)
====
Import Projects
---------------
Import appdist using General -> Maven Projects
Uncheck `jgit`. You don't want to import it. The Maven project
is configured in a non-standard way and the Eclipse plugin can't
import it correctly.
Right click on `gwtorm`, Maven -> Update Project Configuration to
force a compile of the generted ANTLR sources. This fixes the
compile errors identified after import.
Configure Database
------------------
You may have already done this step earlier, based on the
instructions in link:dev-readme.html[Developer Setup].
* Open gerrit-devdb/src/main/config
* Copy `GerritServer.properties_example` to `GerritServer.properties`
* Configure your database for debugging in hosted mode.
Launch Gerrit
-------------
Open Run->Debug Configurations...
Under Java Application find `gerrit_debug` (not Mac OS X)
or `gerrit_macos` (Mac OS X only) to start the GWT hosted
mode browser and debug through Eclipse.