mirror of
https://github.com/apache/maven-mvnd.git
synced 2026-01-13 07:04:14 +08:00
Let mvnd -v show os name and arch
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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}
|
||||
Reference in New Issue
Block a user