compile *.java files only

Summary:
Infer's mvn integration would collect *all* files in `src_roots` and pass them
to `javac`. But these folders may contain non-Java files.

Filter out any file that doesn't end in `.java`.

closes #401
closes #418
closes #442

Reviewed By: martinoluca

Differential Revision: D3741893

fbshipit-source-id: 5c489f9
master
Jules Villard 8 years ago committed by Facebook Github Bot 7
parent 6221956149
commit 4e2cc84bcb

@ -60,7 +60,9 @@ class MavenCapture:
for src_root in src_roots: for src_root in src_roots:
for root, dirs, files in os.walk(src_root): for root, dirs, files in os.walk(src_root):
for name in files: for name in files:
files_to_compile.append(os.path.join(root, name)) if name.endswith(".java"):
path = os.path.join(root, name)
files_to_compile.append(path)
source_roots_next = False source_roots_next = False
elif options_pattern in line: elif options_pattern in line:

Loading…
Cancel
Save