code: private Set<Artifact> findThriftDependencies() throws IOException, MojoExecutionException {
      Set<Artifact> thriftDependencies = new HashSet<Artifact>();
  
      Set<Artifact> deps = new HashSet<Artifact>();
      deps.addAll(project.getArtifacts());
      deps.addAll(project.getDependencyArtifacts());
  
      Map<String, Artifact> depsMap = new HashMap<String, Artifact>();
      for (Artifact dep : deps) {
        depsMap.put(dep.getId(), dep);
      }
  
      for (Artifact artifact : deps) {
        // This artifact has an idl classifier.
        if (isIdlCalssifier(artifact, classifier)) {
          thriftDependencies.add(artifact);
        } else {
          if (isDepOfIdlArtifact(artifact, depsMap)) {
            // Fetch idl artifact for dependency of an idl artifact.
            try {
              Artifact idlArtifact = MavenScroogeCompilerUtil.getIdlArtifact(
                artifact,
                artifactFactory,
                artifactResolver,
                localRepository,
                remoteArtifactRepositories,
                classifier);
              thriftDependencies.add(idlArtifact);
            } catch (MojoExecutionException e) {
              /* Do nothing as this artifact is not an idl artifact
               binary jars may have dependency on thrift lib etc.
               */
              getLog().debug("Could not fetch idl jar for " + artifact);
            }
          }
        }
      }
      return thriftDependencies;
    }
docs: Iterate through dependencies