Class DefaultRuntimeInformation

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getMavenVersion()
      Retrieves the current Maven version, for example "3.0.2".
      boolean isMavenVersion​(java.lang.String versionRange)
      Checks whether the current Maven runtime matches the specified version range.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DefaultRuntimeInformation

        public DefaultRuntimeInformation()
    • Method Detail

      • getMavenVersion

        public java.lang.String getMavenVersion()
        Description copied from interface: RuntimeInformation
        Retrieves the current Maven version, for example "3.0.2".
        Specified by:
        getMavenVersion in interface RuntimeInformation
        Returns:
        The current Maven version or an empty string if unknown, never null.
      • isMavenVersion

        public boolean isMavenVersion​(java.lang.String versionRange)
        Description copied from interface: RuntimeInformation
        Checks whether the current Maven runtime matches the specified version range. A version range can either use the usual mathematical syntax "[2.0.10,2.1.0),[3.0,)" or use a single version "2.2.1". The latter is a short form for "[2.2.1,)", i.e. denotes the minimum version required.
        Specified by:
        isMavenVersion in interface RuntimeInformation
        Parameters:
        versionRange - The version range to match the current Maven runtime against, must not be null.
        Returns:
        true if the current Maven runtime matches the specified version range, false otherwise.