Class VersionHelper
java.lang.Object
org.apache.camel.dsl.jbang.core.common.VersionHelper
-
Method Summary
Modifier and TypeMethodDescriptionstatic intstatic Stringstatic Stringstatic Stringstatic StringgetSpringBootVersion(Supplier<String> supplier) Retrieves the Spring Boot version to use, with support for overriding via system property.static booleanstatic booleanstatic booleanstatic voidsetCamelVersion(String version)
-
Method Details
-
getSpringBootVersion
Retrieves the Spring Boot version to use, with support for overriding via system property. This is particularly useful when the Camel version differs from the Camel Spring Boot version, allowing for explicit version control in JBang scenarios.The method follows this precedence order:
- System property
camel.jbang.camelSpringBootVersionif set - Value from the provided supplier if not null
- Returns null if neither option is available
- Parameters:
supplier- a supplier that provides the default Spring Boot version when no system property override is present. May be null.- Returns:
- the Spring Boot version string, or null if no version can be determined
- System property
-
getJBangVersion
-
isGE
-
isLE
-
isBetween
-
compare
-
extractCamelVersion
-
extractKameletsVersion
-
setCamelVersion
-