Files
gerrit/Documentation/dev-eclipse.txt
David Pursehouse fec5879e12 Move Maven related documentation into its own page
The documentation for setting up and using Maven is currently split
across the main developer documentation page and the Eclipse setup
page.

This change moves it all into a new page, which will make it easier
to add new documentation for Buck in a consistent way.  It will also
make it a bit easier to remove the Maven documentation later, if/when
Maven support is dropped.

Also, the documentation for running the acceptance tests in Maven is
updated to reflect the changes made in commit fe5f59e, which makes the
tests always run in the verify phase unless a specific flag is passed
on the command line.

Change-Id: I6d8f86127f4ad86fcc10450d18ef0c5a2f0c1424
2013-05-13 16:47:52 +09:00

122 lines
3.5 KiB
Plaintext

Gerrit Code Review - Eclipse Setup
==================================
This document is about configuring Gerrit Code Review into an
Eclipse workspace for development and debugging with GWT.
Java 6 or later SDK is also required to run GWT's compiler and
runtime debugging environment.
[[maven]]
Maven
-----
For details of the setup required to build with Maven in Eclipse,
see the link:dev-maven.html#eclipse[Maven documentation].
[[Formatting]]
Code Formatter Settings
-----------------------
Import `tools/GoogleFormat.xml` using Window -> Preferences ->
Java -> Code Style -> Formatter -> Import...
This will define the 'Google Format' profile, which the project
settings prefer when formatting source code.
Site Initialization
-------------------
link:dev-maven.html#build[Build] once on the command line and
then follow link:dev-readme.html#init[Site Initialization] in the
Developer Setup guide to configure a local site for testing.
Testing
-------
Running the Daemon
~~~~~~~~~~~~~~~~~~
Duplicate the existing `pgm_daemon` launch configuration:
* Run -> Debug Configurations ...
* Java Application -> `pgm_daemon`
* Right click, Duplicate
* Modify the name to be unique.
* Switch to Arguments tab.
* Edit the `-d` program argument flag to match the path used during
'init'. The template launch configuration resolves to ../test_site
since that is what the documentation recommends.
* Switch to Common tab.
* Change Save as to be Local file.
* Close the Debug Configurations dialog and save the changes when prompted.
[[hosted-mode]]
Running Hosted Mode
~~~~~~~~~~~~~~~~~~~
To debug the GWT code executing in the web browser, two additional Git
repositories need to be cloned.
* https://gerrit.googlesource.com/gwtjsonrpc
* https://gerrit.googlesource.com/gwtorm
In Eclipse, import the pom.xml file in the root directory of each of
these cloned gits via General -> Maven Projects.
Duplicate the existing `gwtui_dbg` launch configuration:
* Run -> Debug Configurations ...
* Java Application -> `gwtui_dbg`
* Right click, Duplicate
* Modify the name to be unique.
* Switch to Arguments tab.
* Edit the `-Dgerrit.site_path=` VM argument to match the path
used during 'init'. The template launch configuration resolves
to ../test_site since that is what the documentation recommends.
* Switch to Common tab.
* Change Save as to be Local file.
* Close the Debug Configurations dialog and save the changes when prompted.
[[known-problems]]
Known problems
--------------
* OpenID authentication won't work in hosted mode, so you need to change
the link:config-gerrit.html#auth.type[auth.type] configuration parameter
to `DEVELOPMENT_BECOME_ANY_ACCOUNT` to disable OpenID and allow you to
impersonate whatever account you otherwise would've used.
* Error "Cannot create ReviewDb" occurs if the test site is already running.
Stop the test site with `gerrit.sh stop` before attempting to run hosted mode
debugging.
* Gerrit site doesn't appear, only directory listing is shown. Web toolkit
developer browser plugin is missing. If there is no warning, that browser
plugin is missing with the suggestion to install it, you can install the
right extension for your browser from the following locations:
+
https://dl.google.com/dl/gwt/plugins/chrome/gwt-dev-plugin.crx[Chrome]
+
link:https://dl.google.com/dl/gwt/plugins/firefox/gwt-dev-plugin.xpi[Firefox]
+
link:http://dl.google.com/dl/gwt/plugins/ie/1.0.7263.20091208111100/gwt-dev-plugin.msi[IE]
+
https://dl.google.com/dl/gwt/plugins/safari/gwt-dev-plugin.dmg[Safari]
GERRIT
------
Part of link:index.html[Gerrit Code Review]