Package io.spring.initializr.metadata
Class BillOfMaterials
java.lang.Object
io.spring.initializr.metadata.BillOfMaterials
Define a Bill Of Materials to be represented in the generated project if a dependency
refers to it.
- Author:
- Stephane Nicoll
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic BillOfMaterials
static BillOfMaterials
Return the BOM(s) that should be automatically included if this BOM is required.getOrder()
Return the relative order of this BOM where lower values have higher priority.Return the repositories that are required if this BOM is required.Return the version of the BOM.Return theVersionProperty
to use to externalize the version of the BOM.Resolve this instance according to the specified Spring BootVersion
.void
setAdditionalBoms
(List<String> additionalBoms) void
setArtifactId
(String artifactId) void
setGroupId
(String groupId) void
void
setRepositories
(List<String> repositories) void
setVersion
(String version) void
setVersionProperty
(VersionProperty versionProperty) void
setVersionProperty
(String versionPropertyName) toString()
void
updateCompatibilityRange
(VersionParser versionParser) void
validate()
-
Constructor Details
-
BillOfMaterials
public BillOfMaterials()
-
-
Method Details
-
getGroupId
-
setGroupId
-
getArtifactId
-
setArtifactId
-
getVersion
Return the version of the BOM. Can benull
if it is provided via a mapping.- Returns:
- the version of the BOM or
null
-
setVersion
-
getVersionProperty
Return theVersionProperty
to use to externalize the version of the BOM. When this is set, a version property is automatically added rather than setting the version in the BOM declaration itself.- Returns:
- the version property
-
setVersionProperty
-
setVersionProperty
-
getOrder
Return the relative order of this BOM where lower values have higher priority. The default value isInteger.MAX_VALUE
, indicating lowest priority. The Spring Boot dependencies BOM has an order of 100.- Returns:
- the relative order of this BOM
-
setOrder
-
getAdditionalBoms
Return the BOM(s) that should be automatically included if this BOM is required. Can benull
if it is provided via a mapping.- Returns:
- the additional BOMs
-
setAdditionalBoms
-
getRepositories
Return the repositories that are required if this BOM is required. Can benull
if it is provided via a mapping.- Returns:
- the repositories
-
setRepositories
-
getMappings
-
validate
public void validate() -
updateCompatibilityRange
-
resolve
Resolve this instance according to the specified Spring BootVersion
. Return aBillOfMaterials
instance that holds the version, repositories and additional BOMs to use, if any.- Parameters:
bootVersion
- the Spring Boot version- Returns:
- the bill of materials
- Throws:
InvalidInitializrMetadataException
- if no suitable mapping is found for that version
-
toString
-
create
-
create
-