|
|
|
@ -35,10 +35,12 @@ class MavenCapture:
|
|
|
|
|
def get_infer_commands(self, verbose_output):
|
|
|
|
|
file_pattern = r'\[DEBUG\] Stale source detected: ([^ ]*\.java)'
|
|
|
|
|
options_pattern = '[DEBUG] Command line options:'
|
|
|
|
|
source_roots_pattern = '[DEBUG] Source roots:'
|
|
|
|
|
|
|
|
|
|
files_to_compile = []
|
|
|
|
|
calls = []
|
|
|
|
|
options_next = False
|
|
|
|
|
source_roots_next = False
|
|
|
|
|
for line in verbose_output:
|
|
|
|
|
if options_next:
|
|
|
|
|
# line has format [Debug] <space separated options>
|
|
|
|
@ -48,10 +50,23 @@ class MavenCapture:
|
|
|
|
|
options_next = False
|
|
|
|
|
files_to_compile = []
|
|
|
|
|
|
|
|
|
|
elif source_roots_next:
|
|
|
|
|
# line has format [Debug] <space separated directories>
|
|
|
|
|
src_roots = line.split(' ')[1:]
|
|
|
|
|
for src_root in src_roots:
|
|
|
|
|
for root, dirs, files in os.walk(src_root):
|
|
|
|
|
for name in files:
|
|
|
|
|
files_to_compile.append(os.path.join(root, name))
|
|
|
|
|
source_roots_next = False
|
|
|
|
|
|
|
|
|
|
elif options_pattern in line:
|
|
|
|
|
# Next line will have javac options to run
|
|
|
|
|
options_next = True
|
|
|
|
|
|
|
|
|
|
elif source_roots_pattern in line:
|
|
|
|
|
# Next line will have directory containing files to compile
|
|
|
|
|
source_roots_next = True
|
|
|
|
|
|
|
|
|
|
else:
|
|
|
|
|
found = re.match(file_pattern, line)
|
|
|
|
|
if found:
|
|
|
|
|