public GAV asGavObject() { return new GAV(groupId, artifactId, version); } }
private Set<ProductArtifacts> getArtifacts0(GA ga, String repository) { Set<Artifact> allArtifacts = getVersionsStream(ga, repository) .map(x -> new GAV(ga, x)) .map(Artifact::new) .collect(Collectors.toSet()); if (allArtifacts.isEmpty()) { return Collections.emptySet(); } return Collections.singleton(new ProductArtifacts(Product.UNKNOWN, allArtifacts)); }
private Set<ProductArtifacts> getArtifacts0(GA ga) { Set<Artifact> allArtifacts = getVersionsStream(ga) .map(x -> new GAV(ga, x)) .map(Artifact::new) .collect(Collectors.toSet()); if (allArtifacts.isEmpty()) { return Collections.emptySet(); } return Collections.singleton(new ProductArtifacts(Product.UNKNOWN, allArtifacts)); }
@Override public WLStatus fillWhitelistFromGAV(String groupId, String artifactId, String version, long productId) { if (!checkProduct(productId)) { return WLStatus.PRODUCT_NOT_FOUND; } try { final GAV gav = new GAV(groupId, artifactId, version); Optional<InputStream> is = aprox.getPomStream(gav); if (is.isPresent()) { MavenPomView view = analyzer.getMavenPomView(is.get()); fillWLFromPom(view, productId); } else { log.error("POM with given GAV not found in indy " + gav); return WLStatus.POM_NOT_FOUND; } } catch (CommunicationException | ConfigurationParseException | GalleyMavenException e) { log.error(e.getMessage()); return WLStatus.ANALYSER_ERROR; } return WLStatus.FILLED; }
public GAV getGAV() { return new GAV(getGroupId(), getArtifactId(), getVersion()); } }
private static Artifact toArtifact(WhiteArtifact a) { final org.jboss.da.listings.api.model.GA ga = a.getGa(); return new Artifact(new GAV(a.getGa().getGroupId(), ga.getArtifactId(), a.getVersion())); }
public static GAV generateGAV(ProjectVersionRef dep) { return new GAV(dep.getGroupId(), dep.getArtifactId(), dep.getVersionString()); }
private GAV generateGAV(ProjectVersionRef ref) { return new GAV(ref.getGroupId(), ref.getArtifactId(), ref.getVersionString()); }
private static GAV generateGAV(MavenGAVView dep) { try { if (dep.getGroupId() == null || dep.getArtifactId() == null || dep.getVersion() == null) { log.warn("Failed to get gav of dependency because of null field. Dependency: " + dep); return null; } return new GAV(dep.getGroupId(), dep.getArtifactId(), dep.getVersion()); } catch (GalleyMavenException ex) { log.warn("Failed to get gav of dependency " + dep, ex); return null; } }
public GAV getGAV() throws PomAnalysisException { if (ref == null) throw new PomAnalysisException("Failed to get gav from " + path); return new GAV(ref.getGroupId(), ref.getArtifactId(), ref.getVersionString()); }
private POMInfo toPomInfo(MavenProject pom) { GAV gav = new GAV(pom.getGroupId(), pom.getArtifactId(), pom.getVersion()); String url = pom.getScm() != null ? pom.getScm().getUrl() : null; String tag = pom.getScm() != null ? pom.getScm().getTag() : null; return new POMInfo(gav, url, tag, pom.getName()); }