-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
67 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,10 @@ | |
<groupId>info.xonix.gae-pass-manager</groupId> | ||
<artifactId>gae-pass-manager</artifactId> | ||
|
||
<scm> | ||
<connection>scm:git:[email protected]:xonixx/gae-pass-manager.git</connection> | ||
</scm> | ||
|
||
<prerequisites> | ||
<maven>3.1.0</maven> | ||
</prerequisites> | ||
|
@@ -73,6 +77,17 @@ | |
</dependencies> | ||
|
||
<build> | ||
<resources> | ||
<resource> | ||
<directory>src/main/resources</directory> | ||
<!--maven fills varibales--> | ||
<filtering>true</filtering> | ||
<includes> | ||
<include>version.properties</include> | ||
</includes> | ||
</resource> | ||
</resources> | ||
|
||
<!-- for hot reload of the web application--> | ||
<outputDirectory>${project.build.directory}/${project.build.finalName}/WEB-INF/classes</outputDirectory> | ||
<plugins> | ||
|
@@ -141,6 +156,25 @@ | |
<set_default>true</set_default> | ||
</configuration> | ||
</plugin> | ||
|
||
<plugin> | ||
<groupId>org.codehaus.mojo</groupId> | ||
<artifactId>buildnumber-maven-plugin</artifactId> | ||
<version>1.3</version> | ||
<executions> | ||
<execution> | ||
<phase>validate</phase> | ||
<goals> | ||
<goal>create</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
<configuration> | ||
<doCheck>false</doCheck> | ||
<doUpdate>false</doUpdate> | ||
<shortRevisionLength>7</shortRevisionLength> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package info.xonix.passmanager; | ||
|
||
import java.io.IOException; | ||
import java.util.Properties; | ||
import java.util.logging.Level; | ||
import java.util.logging.Logger; | ||
|
||
public class VersionManager { | ||
private final static Logger log = Logger.getLogger(VersionManager.class.getName()); | ||
|
||
private static final Properties versionProps = new Properties(); | ||
public static final String UNKNOWN = "UNKNOWN"; | ||
|
||
public static final String VERSION_FILE = "version.properties"; | ||
|
||
static { | ||
try { | ||
versionProps.load(VersionManager.class.getClassLoader().getResourceAsStream(VERSION_FILE)); | ||
} catch (IOException e) { | ||
log.log(Level.SEVERE, "Can't read project version", e); | ||
} | ||
} | ||
|
||
public static String getApplicationVersion() { | ||
return versionProps.getProperty("pom", UNKNOWN) + | ||
"r" + versionProps.getProperty("revision", UNKNOWN); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
pom=${pom.version} | ||
revision=${buildNumber} | ||
timestamp=${timestamp} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters