public static BillOfMaterials create(String groupId, String artifactId, String version) { return new BillOfMaterials(groupId, artifactId, version); }
public static BillOfMaterials create(String groupId, String artifactId) { return new BillOfMaterials(groupId, artifactId); }
/** * Resolve this instance according to the specified Spring Boot {@link Version}. * Return a {@link BillOfMaterials} instance that holds the version, repositories and * additional BOMs to use, if any. * @param bootVersion the Spring Boot version * @return the bill of materials */ public BillOfMaterials resolve(Version bootVersion) { if (this.mappings.isEmpty()) { return this; } for (Mapping mapping : this.mappings) { if (mapping.range.match(bootVersion)) { BillOfMaterials resolvedBom = new BillOfMaterials( (mapping.groupId != null) ? mapping.groupId : this.groupId, (mapping.artifactId != null) ? mapping.artifactId : this.artifactId, mapping.version); resolvedBom.setVersionProperty(this.versionProperty); resolvedBom.setOrder(this.order); resolvedBom.repositories.addAll(!mapping.repositories.isEmpty() ? mapping.repositories : this.repositories); resolvedBom.additionalBoms.addAll(!mapping.additionalBoms.isEmpty() ? mapping.additionalBoms : this.additionalBoms); return resolvedBom; } } throw new IllegalStateException("No suitable mapping was found for " + this + " and version " + bootVersion); }
NodeList scope = element.getElementsByTagName("scope"); if (isBom(type, scope)) { BillOfMaterials bom = new BillOfMaterials(); NodeList groupId = element.getElementsByTagName("groupId"); if (groupId.getLength() > 0) {