Class VersionReader


  • public class VersionReader
    extends Object
    Reads version from property file. Version is replaced in the property file by maven to match the version in POM.
    • Constructor Detail

      • VersionReader

        public VersionReader()
    • Method Detail

      • getVersion

        public static String getVersion()
        Reads the version from the default file. The default file is the one, where maven sets current version. The version is not cached and every call of this method results in a file read.
        Returns:
        current version of the project as defined in the POM
      • getVersion

        public static String getVersion​(String fileName)
        Reads version from different file Mainly for testing purposes
        Parameters:
        fileName - file to read from
        Returns:
        version of the project