}
public static Version determineWGAVersion(InputStream wgabuildProperties) throws IOException {
Properties props = new Properties();
props.load(wgabuildProperties);
Version version = new Version();
if (props.getProperty("majorVersion") != null) {
version.setMajorVersion(Integer.parseInt(props.getProperty("majorVersion")));
}
if (props.getProperty("minorVersion") != null) {
version.setMinorVersion(Integer.parseInt(props.getProperty("minorVersion")));
}
if (props.getProperty("maintenanceVersion") != null) {
version.setMaintenanceVersion(Integer.parseInt(props.getProperty("maintenanceVersion")));
}
if (props.getProperty("patchVersion") != null) {
version.setPatchVersion(Integer.parseInt(props.getProperty("patchVersion")));
}
if (props.getProperty("buildVersion") != null) {
version.setBuildVersion(Integer.parseInt(props.getProperty("buildVersion")));
}
return version;
}