@Override public void contribute(Info.Builder builder) { Map<String, Object> details = new LinkedHashMap<>(); this.metadataProvider.get().getDependencies().getAll().forEach((dependency) -> { if (dependency.getBom() == null) { contribute(details, dependency); } }); if (!details.isEmpty()) { builder.withDetail("dependency-ranges", details); } }
protected String generateDependencyTable(InitializrMetadata metadata) { String[][] dependencyTable = new String[metadata.getDependencies().getAll().size() + 1][]; dependencyTable[0] = new String[] { "Id", "Description", "Required version" }; int i = 1; for (Dependency dep : metadata.getDependencies().getAll().stream() .sorted(Comparator.comparing(MetadataElement::getId)) .collect(Collectors.toList())) { String[] data = new String[3]; data[0] = dep.getId(); data[1] = (dep.getDescription() != null) ? dep.getDescription() : dep.getName(); data[2] = dep.getVersionRequirement(); dependencyTable[i++] = data; } return TableGenerator.generate(dependencyTable); }
private static void assertDefaultConfig(InitializrMetadata metadata) { assertThat(metadata).isNotNull(); assertThat(metadata.getDependencies().getAll()).hasSize(8); assertThat(metadata.getDependencies().getContent()).hasSize(2); assertThat(metadata.getTypes().getContent()).hasSize(4); }
public DependencyMetadata get(InitializrMetadata metadata, Version bootVersion) { Map<String, Dependency> dependencies = new LinkedHashMap<>(); for (Dependency dependency : metadata.getDependencies().getAll()) { if (dependency.match(bootVersion)) { dependencies.put(dependency.getId(), dependency.resolve(bootVersion));
.getRepositories(); Map<String, BillOfMaterials> boms = this.configuration.getEnv().getBoms(); for (Dependency dependency : this.dependencies.getAll()) { if (dependency.getBom() != null && !boms.containsKey(dependency.getBom())) { throw new InvalidInitializrMetadataException(
@Override public void contribute(Info.Builder builder) { Map<String, Object> details = new LinkedHashMap<>(); this.metadataProvider.get().getDependencies().getAll().forEach((d) -> { if (d.getBom() == null) { contribute(details, d); } }); if (!details.isEmpty()) { builder.withDetail("dependency-ranges", details); } }