def __init__(self, repo_dir):
    # Clear the cache before analyzing the repo
    PomUtils.reset_caches()
    self.repo_dir = repo_dir
    self._top_pom = PomUtils.top_pom_content_handler(rootdir=repo_dir)

    self._pom_details = {}
    # Parse oll of the poms for the modules [ plus the top level pom.xml ]
    module_list = self._top_pom.modules + ['']
    while len(module_list):
      module = module_list.pop()
      if module in self._pom_details.keys():
        continue
      full_source_path = os.path.join(repo_dir, module, 'pom.xml')
      pom_handler = _DFPomContentHandler()
      try:
        with open(full_source_path) as source:
          xml.sax.parse(source, pom_handler)
      except IOError:
        # assume this file has been removed for a good reason and just continue normally
        continue
      self._pom_details[module] = PomDetails(repo_dir, module, pom_handler)
      # Don't forget to also add in the parent poms
      if 'relativePath' in pom_handler.parent:
        parent_module = os.path.join(module, pom_handler.parent['relativePath'])
        if os.path.basename(parent_module) == 'pom.xml':
          parent_module = os.path.dirname(parent_module)
        parent_module =os.path.normpath(parent_module)
        if parent_module not in self._pom_details.keys():
          module_list.append(parent_module)