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 BillOfMaterialsstatic BillOfMaterialsReturn 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 theVersionPropertyto use to externalize the version of the BOM.Resolve this instance according to the specified Spring BootVersion.voidsetAdditionalBoms(List<String> additionalBoms) voidsetArtifactId(String artifactId) voidsetGroupId(String groupId) voidvoidsetRepositories(List<String> repositories) voidsetVersion(String version) voidsetVersionProperty(VersionProperty versionProperty) voidsetVersionProperty(String versionPropertyName) toString()voidupdateCompatibilityRange(VersionParser versionParser) voidvalidate()
-
Constructor Details
-
BillOfMaterials
public BillOfMaterials()
-
-
Method Details
-
getGroupId
-
setGroupId
-
getArtifactId
-
setArtifactId
-
getVersion
Return the version of the BOM. Can benullif it is provided via a mapping.- Returns:
- the version of the BOM or
null
-
setVersion
-
getVersionProperty
Return theVersionPropertyto 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 benullif it is provided via a mapping.- Returns:
- the additional BOMs
-
setAdditionalBoms
-
getRepositories
Return the repositories that are required if this BOM is required. Can benullif 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 aBillOfMaterialsinstance 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
-