Use a Builder for BillOfMaterials

Closes gh-1012
This commit is contained in:
Stephane Nicoll
2019-10-03 14:50:42 +02:00
parent 42c106b6e9
commit 285fec21a7
7 changed files with 132 additions and 45 deletions

View File

@@ -78,8 +78,8 @@ public final class MetadataBuildItemMapper {
}
VersionReference version = (bom.getVersionProperty() != null)
? VersionReference.ofProperty(bom.getVersionProperty()) : VersionReference.ofValue(bom.getVersion());
return new io.spring.initializr.generator.buildsystem.BillOfMaterials(bom.getGroupId(), bom.getArtifactId(),
version, bom.getOrder());
return io.spring.initializr.generator.buildsystem.BillOfMaterials
.withCoordinates(bom.getGroupId(), bom.getArtifactId()).version(version).order(bom.getOrder()).build();
}
/**