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(); } }
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(); } }
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(); } }
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(); } }
return pom.getArtifact(); return pom.getLibrary(action, repositories); } catch (Exception e) { return pom.getArtifact();
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(); } }