Class VersionHelper

java.lang.Object
org.apache.camel.dsl.jbang.core.common.VersionHelper

public final class VersionHelper extends Object
  • Method Details

    • getSpringBootVersion

      public static String getSpringBootVersion(Supplier<String> supplier)
      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:

      1. System property camel.jbang.camelSpringBootVersion if set
      2. Value from the provided supplier if not null
      3. 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
    • getJBangVersion

      public static String getJBangVersion()
    • isGE

      public static boolean isGE(String source, String target)
    • isLE

      public static boolean isLE(String source, String target)
    • isBetween

      public static boolean isBetween(String source, String inclusive, String exclusive)
    • compare

      public static int compare(String source, String target)
    • extractCamelVersion

      public static String extractCamelVersion()
    • extractKameletsVersion

      public static String extractKameletsVersion()
    • setCamelVersion

      public static void setCamelVersion(String version)