/** * Help function to create the POM and record its source. * * @param url the repo from which it was constructed * @return the new pom * @throws Exception */ private CachedPom createPom(URI url) throws Exception { CachedPom pom = new CachedPom(this, url); pom.parse(); poms.put(url, pom); setProperty(url.toASCIIString(), "true"); return pom; }
public File get(String bsn, String version, Strategy strategy, Map<String, String> properties) throws Exception { String groupId = null; if (properties != null) groupId = properties.get("groupId"); if (groupId == null) { int n = bsn.indexOf('+'); if (n < 0) return null; groupId = bsn.substring(0, n); bsn = bsn.substring(n + 1); } String artifactId = bsn; if (version == null) { if (reporter != null) reporter.error("Maven dependency version not set for %s - %s", groupId, artifactId); return null; } CachedPom pom = getMaven().getPom(groupId, artifactId, version, repositories); String value = properties == null ? null : properties.get("scope"); if (value == null) return pom.getArtifact(); Pom.Scope action = null; try { action = Pom.Scope.valueOf(value); return pom.getLibrary(action, repositories); } catch (Exception e) { return pom.getArtifact(); } }
Set<Pom> dependencies = pom.getDependencies(Scope.compile, urls2); for ( Pom dep : dependencies ) { System.out.printf( "%20s %-20s %10s\n", dep.getGroupId(), dep.getArtifactId(), dep.getVersion());
public File get(String bsn, String version, Strategy strategy, Map<String,String> properties) throws Exception { String groupId = null; if (properties != null) groupId = properties.get("groupId"); if (groupId == null) { int n = bsn.indexOf('+'); if (n < 0) return null; groupId = bsn.substring(0, n); bsn = bsn.substring(n + 1); } String artifactId = bsn; if (version == null) { if (reporter != null) reporter.error("Maven dependency version not set for %s - %s", groupId, artifactId); return null; } CachedPom pom = getMaven().getPom(groupId, artifactId, version, repositories); String value = properties == null ? null : properties.get("scope"); if (value == null) return pom.getArtifact(); Pom.Scope action = null; try { action = Pom.Scope.valueOf(value); return pom.getLibrary(action, repositories); } catch (Exception e) { return pom.getArtifact(); } }
Set<Pom> dependencies = pom.getDependencies(Scope.compile, urls2); for (Pom dep : dependencies) { System.err.printf("%20s %-20s %10s%n", dep.getGroupId(), dep.getArtifactId(), dep.getVersion());
/** * Help function to create the POM and record its source. * * @param url the repo from which it was constructed * @return the new pom * @throws Exception */ private CachedPom createPom(URI url) throws Exception { CachedPom pom = new CachedPom(this, url); pom.parse(); poms.put(url, pom); setProperty(url.toASCIIString(), "true"); return pom; }
public File get(String bsn, String version, Strategy strategy, Map<String, String> properties) throws Exception { String groupId = null; if (properties != null) groupId = properties.get("groupId"); if (groupId == null) { int n = bsn.indexOf('+'); if (n < 0) return null; groupId = bsn.substring(0, n); bsn = bsn.substring(n + 1); } String artifactId = bsn; if (version == null) { if (reporter != null) reporter.error("Maven dependency version not set for %s - %s", groupId, artifactId); return null; } CachedPom pom = getMaven().getPom(groupId, artifactId, version, repositories); String value = properties == null ? null : properties.get("scope"); if (value == null) return pom.getArtifact(); Pom.Scope action = null; try { action = Pom.Scope.valueOf(value); return pom.getLibrary(action, repositories); } catch (Exception e) { return pom.getArtifact(); } }
Set<Pom> dependencies = pom.getDependencies(Scope.compile, urls2); for (Pom dep : dependencies) { System.err.printf("%20s %-20s %10s%n", dep.getGroupId(), dep.getArtifactId(), dep.getVersion());
/** * Help function to create the POM and record its source. * * @param url * the repo from which it was constructed * @return the new pom * @throws Exception */ private CachedPom createPom(URI url) throws Exception { CachedPom pom = new CachedPom(this, url); pom.parse(); poms.put(url, pom); setProperty(url.toASCIIString(), "true"); return pom; }
public File get(String bsn, String version, Strategy strategy, Map<String,String> properties) throws Exception { String groupId = null; if (properties != null) groupId = properties.get("groupId"); if (groupId == null) { int n = bsn.indexOf('+'); if (n < 0) return null; groupId = bsn.substring(0, n); bsn = bsn.substring(n + 1); } String artifactId = bsn; if (version == null) { if (reporter != null) reporter.error("Maven dependency version not set for %s - %s", groupId, artifactId); return null; } CachedPom pom = getMaven().getPom(groupId, artifactId, version, repositories); String value = properties == null ? null : properties.get("scope"); if (value == null) return pom.getArtifact(); Pom.Scope action = null; try { action = Pom.Scope.valueOf(value); return pom.getLibrary(action, repositories); } catch (Exception e) { return pom.getArtifact(); } }
Set<Pom> dependencies = pom.getDependencies(Scope.compile, urls2); for (Pom dep : dependencies) { System.err.printf("%20s %-20s %10s%n", dep.getGroupId(), dep.getArtifactId(), dep.getVersion());
/** * Help function to create the POM and record its source. * * @param url * the repo from which it was constructed * @return the new pom * @throws Exception */ private CachedPom createPom(URI url) throws Exception { CachedPom pom = new CachedPom(this, url); pom.parse(); poms.put(url, pom); setProperty(url.toASCIIString(), "true"); return pom; }
return pom.getArtifact(); return pom.getLibrary(action, repositories); } catch (Exception e) { return pom.getArtifact();
Set<Pom> dependencies = pom.getDependencies(Scope.compile, urls2); for (Pom dep : dependencies) { System.err.printf("%20s %-20s %10s%n", dep.getGroupId(), dep.getArtifactId(),
/** * Help function to create the POM and record its source. * * @param url * the repo from which it was constructed * @return the new pom * @throws Exception */ private CachedPom createPom(URI url) throws Exception { CachedPom pom = new CachedPom(this, url); pom.parse(); poms.put(url, pom); setProperty(url.toASCIIString(), "true"); return pom; }
public File get(String bsn, String version, Strategy strategy, Map<String,String> properties) throws Exception { String groupId = null; if (properties != null) groupId = properties.get("groupId"); if (groupId == null) { int n = bsn.indexOf('+'); if (n < 0) return null; groupId = bsn.substring(0, n); bsn = bsn.substring(n + 1); } String artifactId = bsn; if (version == null) { if (reporter != null) reporter.error("Maven dependency version not set for %s - %s", groupId, artifactId); return null; } CachedPom pom = getMaven().getPom(groupId, artifactId, version, repositories); String value = properties == null ? null : properties.get("scope"); if (value == null) return pom.getArtifact(); Pom.Scope action = null; try { action = Pom.Scope.valueOf(value); return pom.getLibrary(action, repositories); } catch (Exception e) { return pom.getArtifact(); } }
Set<Pom> dependencies = pom.getDependencies(Scope.compile, urls2); for (Pom dep : dependencies) { System.err.printf("%20s %-20s %10s%n", dep.getGroupId(), dep.getArtifactId(),
/** * Help function to create the POM and record its source. * * @param url * the repo from which it was constructed * @return the new pom * @throws Exception */ private CachedPom createPom(URI url) throws Exception { CachedPom pom = new CachedPom(this, url); pom.parse(); poms.put(url, pom); setProperty(url.toASCIIString(), "true"); return pom; }