private static Set<String> getPrefixesIncludingAliases(Artifact a) { Set<String> prefixes = new HashSet<>(); for (ArtifactId aid : a.getAliases(true)) { String id = aid.toMvnId(); prefixes.add(id.substring(0, id.lastIndexOf(':') + 1)); } return prefixes; }
private static List<Artifact> findAliasedArtifacts(ArtifactId id, Artifacts bundles) { List<Artifact> result = new ArrayList<>(); String prefix = id.getGroupId() + ":" + id.getArtifactId() + ":"; for (Artifact a : bundles) { for (ArtifactId aid : a.getAliases(false)) { if (aid.toMvnId().startsWith(prefix)) { result.add(a); } } } return result; }
for(final Map.Entry<Integer, List<Artifact>> entry : source.getBundlesByStartOrder().entrySet()) { for(final Artifact a : entry.getValue()) { Set<ArtifactId> artifactIds = a.getAliases(true);
Set<ArtifactId> artifactIds = a.getAliases(true);