Buck: Fix eclipse project generation

After refactoring done in Ia46c0559a lib/jgit is recognized as source
folder for the non existing Edit patch library:

  $ buck audit classpath //gerrit-gwtui:ui_module
  buck-out/gen/lib/jgit/lib__Edit__output/Edit.jar

As the consequence non existing path is induced from it and included
in .classpath file:

  path="/home/davido/projects/gerrit/lib/jgit/src/main/java"

Add a check for existence of source folder and include it only if the
folder exists.

Change-Id: Icef39196173722c9c8b760c041a4c9ec9d22ab7c
This commit is contained in:
David Ostrovsky
2015-06-26 06:59:33 +02:00
committed by David Pursehouse
parent cd9dab02e4
commit f3285e0280

View File

@@ -178,7 +178,8 @@ def gen_classpath():
classpathentry('lib', j, s)
for s in sorted(gwt_src):
p = path.join(ROOT, s, 'src', 'main', 'java')
classpathentry('lib', p, out='buck-out/eclipse/gwtsrc')
if path.exists(p):
classpathentry('lib', p, out='buck-out/eclipse/gwtsrc')
classpathentry('con', JRE)
classpathentry('output', 'buck-out/eclipse/classes')