Skip to content

Commit

Permalink
Missed new java class in release.
Browse files Browse the repository at this point in the history
  • Loading branch information
bwssytems committed Nov 3, 2015
1 parent e29f129 commit 2e6944d
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>com.bwssystems.HABridge</groupId>
<artifactId>ha-bridge</artifactId>
<version>1.0.5</version>
<version>1.0.6</version>
<packaging>jar</packaging>

<name>HA Bridge</name>
Expand Down
50 changes: 50 additions & 0 deletions src/main/java/com/bwssystems/HABridge/Version.java
Original file line number Diff line number Diff line change
@@ -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;
}

}

0 comments on commit 2e6944d

Please sign in to comment.