mirror of
https://github.com/bwssytems/ha-bridge.git
synced 2025-12-18 16:17:30 +00:00
Missed new java class in release.
This commit is contained in:
2
pom.xml
2
pom.xml
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
<groupId>com.bwssystems.HABridge</groupId>
|
<groupId>com.bwssystems.HABridge</groupId>
|
||||||
<artifactId>ha-bridge</artifactId>
|
<artifactId>ha-bridge</artifactId>
|
||||||
<version>1.0.5</version>
|
<version>1.0.6</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<name>HA Bridge</name>
|
<name>HA Bridge</name>
|
||||||
|
|||||||
50
src/main/java/com/bwssystems/HABridge/Version.java
Normal file
50
src/main/java/com/bwssystems/HABridge/Version.java
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
package com.bwssystems.HABridge;
|
||||||
|
|
||||||
|
import java.io.InputStream;
|
||||||
|
import java.util.Properties;
|
||||||
|
|
||||||
|
|
||||||
|
public final class Version {
|
||||||
|
|
||||||
|
private String version;
|
||||||
|
private String groupId;
|
||||||
|
private String artifactId;
|
||||||
|
private Properties prop;
|
||||||
|
|
||||||
|
public Version()
|
||||||
|
{
|
||||||
|
InputStream resourceAsStream =
|
||||||
|
(InputStream) this.getClass().getResourceAsStream(
|
||||||
|
"/version.properties"
|
||||||
|
);
|
||||||
|
this.prop = new Properties();
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
this.prop.load( resourceAsStream );
|
||||||
|
this.version = this.prop.getProperty("version");
|
||||||
|
this.groupId = this.prop.getProperty("groupId");
|
||||||
|
this.artifactId = this.prop.getProperty("artifactId");
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
this.version = "0.0.0";
|
||||||
|
this.groupId = "no group";
|
||||||
|
this.artifactId = "no artifact";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getVersion() {
|
||||||
|
return version;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGroupId() {
|
||||||
|
return groupId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getArtifactId() {
|
||||||
|
return artifactId;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user