public BillOfMaterials resolve()

in initializr-generator/src/main/java/io/spring/initializr/metadata/BillOfMaterials.java [186:209]


	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);
	}