Don't put plugins into system classpath
Plugin code is often loaded into the workspace in Eclipse, and is
therefore part of the default project path. Detect this at startup
time by looking for gerrit.buck-out system property and building a
new classpath consisting only of the primary classes and JARs.
The GWT compiler, tests and plugins are excluded from the classpath,
preventing weird collisions with the dynamically loaded plugins from
$site_path/plugins.
PluginLoader recognizes the split output directory used by Eclipse and
loads the latest classes files ahead of anything from the JAR in
$site_path/plugins. This makes development of most code changes quick
by hiding the staleness of the installed JAR.
Change-Id: I4b879eebbcb332384c4e747d3f0c4b5c948c5fed
diff --git a/tools/eclipse/gerrit_daemon.launch b/tools/eclipse/gerrit_daemon.launch
index c57a368..51e4a80 100644
--- a/tools/eclipse/gerrit_daemon.launch
+++ b/tools/eclipse/gerrit_daemon.launch
@@ -13,4 +13,5 @@
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="Main"/>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="daemon --console-log --show-stack-trace -d ${resource_loc:/gerrit}/../test_site"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="gerrit"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dgerrit.plugin-classes=${resource_loc:/gerrit/buck-out}/eclipse/plugins"/>
</launchConfiguration>