diff options
author | Manuel Bentele | 2021-07-02 15:42:32 +0200 |
---|---|---|
committer | Manuel Bentele | 2021-07-02 15:42:32 +0200 |
commit | 458e99c73bc9f741552014dc5927070553fcc09a (patch) | |
tree | 8f06528e7ddf7ab14fb034a96a337a96fd1f7352 | |
parent | Add database test data for debugging purposes (diff) | |
download | masterserver-458e99c73bc9f741552014dc5927070553fcc09a.tar.gz masterserver-458e99c73bc9f741552014dc5927070553fcc09a.tar.xz masterserver-458e99c73bc9f741552014dc5927070553fcc09a.zip |
Add printing of app information from MANIFEST.MF
-rw-r--r-- | pom.xml | 37 | ||||
-rw-r--r-- | src/main/java/org/openslx/imagemaster/App.java | 9 |
2 files changed, 40 insertions, 6 deletions
@@ -8,10 +8,15 @@ <packaging>jar</packaging> <name>image-master</name> - <url>http://maven.apache.org</url> + <url>https://git.openslx.org/bwlp/masterserver.git/</url> + + <scm> + <connection>scm:git:git://git.openslx.org/bwlp/masterserver.git</connection> + </scm> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + <main.class>org.openslx.imagemaster.App</main.class> </properties> <profiles> @@ -79,6 +84,27 @@ <build> <plugins> <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>buildnumber-maven-plugin</artifactId> + <version>1.4</version> + <executions> + <execution> + <phase>package</phase> + <goals> + <goal>create</goal> + </goals> + </execution> + </executions> + <configuration> + <doCheck>false</doCheck> + <doUpdate>false</doUpdate> + <timezone>UTC</timezone> + <timestampPropertyName>build.time</timestampPropertyName> + <scmBranchPropertyName>revision.branch</scmBranchPropertyName> + <buildNumberPropertyName>revision.version</buildNumberPropertyName> + </configuration> + </plugin> + <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.6.1</version> @@ -111,8 +137,15 @@ <configuration> <archive> <manifest> - <mainClass>org.openslx.imagemaster.App</mainClass> + <mainClass>${main.class}</mainClass> + <addDefaultImplementationEntries>true</addDefaultImplementationEntries> + <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries> </manifest> + <manifestEntries> + <Build-Timestamp>${build.time}</Build-Timestamp> + <Revision-Branch>${revision.branch}</Revision-Branch> + <Revision-Version>${revision.version}</Revision-Version> + </manifestEntries> </archive> <descriptorRefs> <descriptorRef>jar-with-dependencies</descriptorRef> diff --git a/src/main/java/org/openslx/imagemaster/App.java b/src/main/java/org/openslx/imagemaster/App.java index 6b68770..f9b5399 100644 --- a/src/main/java/org/openslx/imagemaster/App.java +++ b/src/main/java/org/openslx/imagemaster/App.java @@ -13,6 +13,7 @@ import org.apache.thrift.transport.TTransportException; import org.openslx.imagemaster.localrpc.NetworkHandler; import org.openslx.imagemaster.thrift.server.BinaryListener; import org.openslx.sat.thrift.version.Version; +import org.openslx.util.AppUtil; /** * The main class that starts all the services. @@ -22,6 +23,8 @@ public class App private static Logger log = Logger.getLogger( App.class ); + private static final String NAME = "Master-Server"; + private static List<Thread> servers = new ArrayList<>(); public static void main( String[] args ) throws TTransportException, NoSuchAlgorithmException, SocketException @@ -31,10 +34,8 @@ public class App BasicConfigurator.configure(); } - log.info( "****************************************************************" ); - log.info( "******************* Starting Application ***********************" ); - log.info( "****************************************************************" ); - log.info( "RPC version " + Version.VERSION ); + AppUtil.logHeader( log, App.NAME, App.class.getPackage().getImplementationVersion() ); + AppUtil.logProperty( log, "rpc.version", Long.toString( Version.VERSION ) ); // Create binary listener Thread t; |