comparison mxtool/mx.py @ 21979:c0b6865b7698

Include dependencies of a library when it is put into -processorpath
author Jaroslav Tulach <jaroslav.tulach@oracle.com>
date Tue, 16 Jun 2015 15:26:43 +0200
parents a6425aa8f70c
children 416e4e9d70fa
comparison
equal deleted inserted replaced
21978:f0a982a28944 21979:c0b6865b7698
587 Gets the class path composed of the distribution jars containing the 587 Gets the class path composed of the distribution jars containing the
588 annotation processors that will be applied when compiling this project. 588 annotation processors that will be applied when compiling this project.
589 """ 589 """
590 def annotation_processors_path(self): 590 def annotation_processors_path(self):
591 aps = [project(ap) for ap in self.annotation_processors()] 591 aps = [project(ap) for ap in self.annotation_processors()]
592 libAps = [dep for dep in self.all_deps([], includeLibs=True, includeSelf=False) if dep.isLibrary() and hasattr(dep, 'annotationProcessor') and getattr(dep, 'annotationProcessor').lower() == 'true'] 592 libAps = set()
593 for dep in self.all_deps([], includeLibs=True, includeSelf=False):
594 if dep.isLibrary() and hasattr(dep, 'annotationProcessor') and getattr(dep, 'annotationProcessor').lower() == 'true':
595 libAps = libAps.union(dep.all_deps([], includeLibs=True, includeSelf=True))
593 if len(aps) + len(libAps): 596 if len(aps) + len(libAps):
594 return os.pathsep.join([ap.definedAnnotationProcessorsDist.path for ap in aps if ap.definedAnnotationProcessorsDist] + [lib.get_path(False) for lib in libAps]) 597 return os.pathsep.join([ap.definedAnnotationProcessorsDist.path for ap in aps if ap.definedAnnotationProcessorsDist] + [lib.get_path(False) for lib in libAps])
595 return None 598 return None
596 599
597 def uses_annotation_processor_library(self): 600 def uses_annotation_processor_library(self):