public Artifact getArtifact(String groupId, String artifactId, String version) { for (URL repository : repositories) { String path = getPath(repository.toString(), groupId, artifactId, version); try { URI url = new URL(path + ".pom").toURI(); if (cache.containsKey(url)) { return cache.get(url); } return new Artifact(url.toURL()); } catch (Exception e) { System.err.println("Failed to get " + artifactId + " from " + repository); } } return null; }
public Artifact getArtifact(String groupId, String artifactId, String version) { for (URL repository : repositories) { String path = getPath(repository.toString(), groupId, artifactId, version); try { URI url = new URL(path + ".pom").toURI(); if (cache.containsKey(url)) { return cache.get(url); } return new Artifact(url.toURL()); } catch (Exception e) { System.err.println("Failed to get " + artifactId + " from " + repository); } } return null; }
/** * @param xp * @param node * @param d * @throws XPathExpressionException */ public Artifact getArtifact(String groupId, String artifactId, String version) { for (URL repository : repositories) { String path = getPath(repository.toString(), groupId, artifactId, version); try { URI url = new URL(path + ".pom").toURI(); if (cache.containsKey(url)) { return cache.get(url); } return new Artifact(url.toURL()); } catch (Exception e) { System.err.println("Failed to get " + artifactId + " from " + repository); } } return null; }
/** * @param xp * @param node * @param d * @throws XPathExpressionException */ public Artifact getArtifact(String groupId, String artifactId, String version) { for (URL repository : repositories) { String path = getPath(repository.toString(), groupId, artifactId, version); try { URI url = new URL(path + ".pom").toURI(); if (cache.containsKey(url)) { return cache.get(url); } return new Artifact(url.toURL()); } catch (Exception e) { System.err.println("Failed to get " + artifactId + " from " + repository); } } return null; }
/** * @param xp * @param node * @param d * @throws XPathExpressionException */ public Artifact getArtifact(String groupId, String artifactId, String version) { for (URL repository : repositories) { String path = getPath(repository.toString(), groupId, artifactId, version); try { URL url = new URL(path + ".pom"); if (cache.containsKey(url)) { return cache.get(url); } else { return new Artifact(url); } } catch (Exception e) { System.err.println("Failed to get " + artifactId + " from " + repository); } } return null; }
/** * @param xp * @param node * @param d * @throws XPathExpressionException */ public Artifact getArtifact(String groupId, String artifactId, String version) { for (URL repository : repositories) { String path = getPath(repository.toString(), groupId, artifactId, version); try { URI url = new URL(path + ".pom").toURI(); if (cache.containsKey(url)) { return cache.get(url); } return new Artifact(url.toURL()); } catch (Exception e) { System.err.println("Failed to get " + artifactId + " from " + repository); } } return null; }