Set<JpsArtifact> (@NotNull Collection<? extends JpsArtifact> artifacts) { Set<JpsArtifact> result = new HashSet<>(); for (JpsArtifact artifact : artifacts) { collectIncludedArtifacts(artifact, new HashSet<>(), result, true); } return result; }