Pick up the version from the properties file.

@return the product version
@throws IOException if version cannot be identified
339367
protected String getVersion() throws IOException {
        InputStream stream = null;
        try {
            Properties version = new Properties();
            stream = Cob2XsdMain.class.getResourceAsStream(VERSION_FILE_NAME);
            version.load(stream);
            return version.getProperty("version");
        } finally {
            if (stream != null) {
                stream.close();
            }
        }
    }
850417
@Override
  public String getVersion(URI uri) throws IOException
  {
    try {
      return StringUtils.format("%d", buildFileObject(uri, config).getLastModified());
    }
    catch (HdfsIOException ex) {
      throw ex.getIOException();
    }
  }
557293
public static String getVersion(InputStream is) {
		try {
			String text = readAsString(is);
			return getVersionFromText(text);
		} catch (IOException e) {
			LOG.error(e.getMessage(), e);
			return null;
		}
	}
988453
String getBuildVersion() {
        if (this.buildVersion == null) {
            Properties prop = new Properties();
            try {
                // try system
                URL u = ClassLoader.getSystemResource(SQLG_APPLICATION_PROPERTIES);
                if (u == null) {
                    // try own class loader
                    u = getClass().getClassLoader().getResource(SQLG_APPLICATION_PROPERTIES);
                }
                if (u != null) {
                    try (InputStream is = u.openStream()) {
                        prop.load(is);
                    }
                    this.buildVersion = prop.getProperty(APPLICATION_VERSION);
                }
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return this.buildVersion;
    }
507596
public static int getBuildVersion() {
		try {
			Properties props = new Properties();
			props.load(ResourceLoader.getResourceAsStream("version"));
			
			int build = Integer.parseInt(props.getProperty("build"));
			Log.info("Slick Build #"+build);
			
			return build;
		} catch (Exception e) {
			Log.error("Unable to determine Slick build number");
			return -1;
		}
	}
533971
public static String getVersion()
  {
    String rev = getBuildRevision();
    Date date = getBuildDate();
    StringBuilder result = new StringBuilder();

    result.append(getReleaseName());
    if (!"".equals(rev) || date != null)
    {
      result.append(" (");

      boolean added = false;
      if (!"".equals(rev))
      {
        result.append("rev. ");
        result.append(rev);
        added = true;
      }
      if (date != null)
      {
        result.append(added ? ", built " : "");

        SimpleDateFormat d = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        result.append(d.format(date));
      }

      result.append(")");
    }

    return result.toString();
  }
116264
public String getMdwVersion() throws IOException {
        if (mdwVersion == null) {
            YamlProperties yaml = getProjectYaml();
            if (yaml != null) {
                mdwVersion = yaml.getString(Props.ProjectYaml.MDW_VERSION);
            }
        }
        return mdwVersion;
    }
970724
static String getVersionForFile(final File file)  {
        try {
            final PluginMeta pluginMeta = loadMeta(file);
            return pluginMeta.getVersion();
        } catch (IOException e) {
            e.printStackTrace();
        }
        return null;
    }
759205
public static int getVersion(URI editsURI) throws IOException {
    if (editsURI.getScheme().equals(NNStorage.LOCAL_URI_SCHEME)) {
      StorageDirectory sd = new NNStorage(new StorageInfo()).new StorageDirectory(
          new File(editsURI.getPath()));
      File versionFile = sd.getVersionFile();
      if (!versionFile.exists()) {
        throw new IOException("No VERSION file in: " + editsURI + "version file: " + versionFile );
      }
      Properties props = Storage.getProps(versionFile);
      String layout = props.getProperty(Storage.LAYOUT_VERSION);
      if (layout == null) {
        throw new IOException("No layout version in: " + editsURI);
      }
      return Integer.valueOf(layout);
    } else {
      throw new IOException("Non file journals not supported yet.");
    }
  }
910713
public static String getVersionString() {
		String versionString = "UNKNOWN";
		Properties propeties = getProperites();
		if(propeties != null) {
			versionString = propeties.getProperty("finmath-lib.version");
		}
		return versionString;
	}
1278835
private static int getJavaVersion() {
		String version = System.getProperty("java.version");
		if (version == null) {
			return -1;
		} else {
			int index = version.indexOf('.');
			if (index > 0) {
				version = version.substring(0, index);
			}

			try {
				return Integer.parseInt(version);
			} catch (NumberFormatException ex) {
				return -1;
			}
		}
	}
443154
public int getVersion(final Object iPojo) {
		final ODocument record = getRecordByUserObject(iPojo, false);

		if (record == null)
			throw new OObjectNotManagedException("The object " + iPojo + " is not managed by current database");

		return record.getVersion();
	}
281496
public CloudSdkVersion getVersion() throws CloudSdkVersionFileException {
    Path versionFile = getPath().resolve(VERSION_FILE_NAME);

    if (!Files.isRegularFile(versionFile)) {
      throw new CloudSdkVersionFileNotFoundException(
          "Cloud SDK version file not found at " + versionFile.toString());
    }

    String contents = "";
    try {
      List<String> lines = Files.readAllLines(versionFile, StandardCharsets.UTF_8);
      if (lines.size() > 0) {
        // expect only a single line
        contents = lines.get(0);
      }
      return new CloudSdkVersion(contents);
    } catch (IOException ex) {
      throw new CloudSdkVersionFileException(ex);
    } catch (IllegalArgumentException ex) {
      throw new CloudSdkVersionFileParseException(
          "Pattern found in the Cloud SDK version file could not be parsed: " + contents, ex);
    }
  }
1267279
private static String getVersionFromPom() {

        final String absolutePath = new File(BuildVersion.class.getResource(BuildVersion.class
                .getSimpleName() + ".class").getPath())
                .getParentFile().getParentFile().getParentFile().getParentFile().getParentFile()
                .getParentFile().getParentFile().getAbsolutePath();

        final File file = new File(absolutePath + "/pom.xml");

        try (InputStreamReader reader = new InputStreamReader(new FileInputStream(file), StandardCharsets.UTF_8)) {

            final MavenXpp3Reader xpp3Reader = new MavenXpp3Reader();
            Model model = xpp3Reader.read(reader);
            return model.getVersion();

        } catch (NoClassDefFoundError e) {
            // if you want to get the version possibly in development add in to your pom
            // pax-url-aether.jar
            return null;
        } catch (Exception e) {
            return null;
        }
    }
915169
private Properties getArtifactProperties() {
        Properties properties = new Properties();
        try (InputStream stream = Main.class.getResourceAsStream("/project.properties")) {
            properties.load(stream);
        } catch (IOException e) {
            logger.error("Failed to get version ", e);
        }
        return properties;
    }
224644
public int getUserVersion() {
		int userVersion = -1;
		Integer userVersionObject = querySingleTypedResult(
				"PRAGMA user_version", null, GeoPackageDataType.MEDIUMINT);
		if (userVersionObject != null) {
			userVersion = userVersionObject;
		}
		return userVersion;
	}
622160
public static String getJavaTargetVersionFromPom() {
        try {
            Properties properties = new Properties();
            ClassLoader classLoader = ClassLoader.getSystemClassLoader();
            properties.load(classLoader.getResourceAsStream("project.properties"));
            return "" + properties.getProperty("targetJavaVersion");
        } catch (Exception ex) {
            return "";
        }
    }