Let mvnd -v show os name and arch

This commit is contained in:
Peter Palaga
2020-08-15 08:48:39 +02:00
parent d335f0db37
commit 28d0765667
9 changed files with 51 additions and 9 deletions

View File

@@ -34,16 +34,31 @@ public class BuildProperties {
} catch (IOException e) {
throw new RuntimeException("Could not read build.properties");
}
return new BuildProperties(buildProperties.getProperty("version"));
return new BuildProperties(
buildProperties.getProperty("version"),
buildProperties.getProperty("os.detected.name"),
buildProperties.getProperty("os.detected.arch"));
}
private final String version;
private final String osName;
private final String osArch;
public BuildProperties(String version) {
public BuildProperties(String version, String os, String arch) {
this.version = version;
this.osName = os;
this.osArch = arch;
}
public String getVersion() {
return version;
}
public String getOsName() {
return osName;
}
public String getOsArch() {
return osArch;
}
}

View File

@@ -20,4 +20,6 @@ timestamp=${timestamp}
version=${project.version}
distributionId=${distributionId}
distributionShortName=${distributionShortName}
distributionName=${distributionName}
distributionName=${distributionName}
os.detected.name=${os.detected.name}
os.detected.arch=${os.detected.arch}