Esempio n. 1
0
 def _addrootsaction(self, roots):
     print "Adding roots", [os.path.abspath(root) for root in roots]
     # TODO only count as a newpom if it's not already present
     newpoms = []
     for root in roots:
         for fn in maven.findpoms(os.path.abspath(root)):
             print "Adding pom", fn
             newpoms.append(maven.parse(fn))
     # TODO add roots to watchdog
     for newpom in newpoms:
         newpom.srcclasses = [classloc for root in newpom.srcdirs for classloc in get_classes_in_root(root)]
         newpom.testclasses = [classloc for root in newpom.testsrcdirs for classloc in get_classes_in_root(root)]
     with self.modlock:
         for newpom in newpoms:
             self.resolver.addpom(newpom)
         self.resolver.resolve()
Esempio n. 2
0
def createreso(base="test/goodpoms/basic"):
    reso = maven.Resolver()
    for fn in maven.findpoms(base):
        reso.addpom(maven.parse(fn))
    return reso