code: private void collectDependenciesFromPomXml(Set<String> bomFiles, Collection<AgentProjectInfo> projects) {
          MavenPomParser pomParser = new MavenPomParser(ignorePomModules);
          List<BomFile> bomFileList = new LinkedList<>();
          HashMap<String, String> bomArtifactPathMap = new HashMap<>();
          for (String bomFileName : bomFiles) {
              BomFile bomfile = pomParser.parseBomFile(bomFileName);
              bomFileList.add(bomfile);
              bomArtifactPathMap.put(bomfile.getName(), bomFileName);
          }
  
          for (AgentProjectInfo project : projects) {
              //add dependencies from pom to the modules that didn't fail (or failed partially)
              String pomLocationPerProject = bomArtifactPathMap.get(project.getCoordinates().getArtifactId());
              if(pomLocationPerProject != null) {
                  bomArtifactPathMap.remove(project.getCoordinates().getArtifactId());
                  List<DependencyInfo> dependencyInfoList = pomParser.parseDependenciesFromPomXml(pomLocationPerProject);
                  // making sure not to add duplication of already existing dependencies
                  project.getDependencies().addAll(dependencyInfoList.stream().filter(dependencyInfo -> project.getDependencies().contains(dependencyInfo) == false).collect(Collectors.toList()));
              }
          }
  
          for (String artifactId : bomArtifactPathMap.keySet()) {
              for (BomFile missingProject : bomFileList) {
                  //if project was not created due to failure add its dependencies
                  if (artifactId.equals(missingProject.getName())) {
                      AgentProjectInfo projectInfo = new AgentProjectInfo();
                      projectInfo.setCoordinates(new Coordinates(missingProject.getGroupId(), missingProject.getName(), missingProject.getVersion()));
                      projectInfo.getDependencies().addAll(pomParser.parseDependenciesFromPomXml(bomArtifactPathMap.get(missingProject.getName())));
                      projects.add(projectInfo);
                      break;
                  }
              }
          }
      }
docs: when failing to read data from 'mvn dependency:tree' output - trying to read directly from POM files