From 8a2bf6b784b5e3f8e0ad86a926dbcb86371809e3 Mon Sep 17 00:00:00 2001 From: Manuel Bentele Date: Thu, 16 Dec 2021 16:26:22 +0100 Subject: [daemon] Add printing of app information from MANIFEST.MF --- daemon/pom.xml | 43 ++++++++++++++++++++-- .../src/main/java/org/openslx/taskmanager/App.java | 5 +++ 2 files changed, 45 insertions(+), 3 deletions(-) diff --git a/daemon/pom.xml b/daemon/pom.xml index 6253441..d4f8397 100644 --- a/daemon/pom.xml +++ b/daemon/pom.xml @@ -7,13 +7,37 @@ 1.0-SNAPSHOT taskmanager-daemon https://git.openslx.org/openslx-ng/taskman-lite.git - + + scm:git:git://git.openslx.org/openslx-ng/taskman-lite.git + + org.openslx.taskmanager.App UTF-8 + + org.codehaus.mojo + buildnumber-maven-plugin + 3.0.0 + + + package + + create + + + + + false + false + UTC + build.time + revision.branch + revision.version + + org.apache.maven.plugins maven-compiler-plugin @@ -28,7 +52,7 @@ org.apache.maven.plugins maven-assembly-plugin - 3.3.0 + 3.0.0 package @@ -40,8 +64,15 @@ - org.openslx.taskmanager.App + ${main.class} + true + true + + ${build.time} + ${revision.branch} + ${revision.version} + jar-with-dependencies @@ -66,6 +97,12 @@ ${project.version} compile + + org.openslx.bwlp + master-sync-shared + 1.1-SNAPSHOT + compile + org.apache.logging.log4j log4j-api diff --git a/daemon/src/main/java/org/openslx/taskmanager/App.java b/daemon/src/main/java/org/openslx/taskmanager/App.java index 4251478..ac3dc71 100644 --- a/daemon/src/main/java/org/openslx/taskmanager/App.java +++ b/daemon/src/main/java/org/openslx/taskmanager/App.java @@ -13,6 +13,7 @@ import org.openslx.taskmanager.main.Taskmanager; import org.openslx.taskmanager.network.NetworkHandlerTcp; import org.openslx.taskmanager.network.NetworkHandlerUdp; import org.openslx.taskmanager.network.RequestParser; +import org.openslx.util.AppUtil; /** * Hello world! @@ -23,6 +24,8 @@ public class App private static final Logger log = LogManager.getLogger( App.class ); + private static final String NAME = "bwLehrpool-Taskmanager"; + public static void main( String[] args ) throws InterruptedException, IOException { // setup basic logging appender to log output on console if no external appender (log4j.properties) is configured @@ -30,6 +33,8 @@ public class App Configurator.initialize(new DefaultConfiguration()); } + AppUtil.logHeader(log, App.NAME, App.class.getPackage().getImplementationVersion()); + if (Global.PORT_UDP == -1 && Global.PORT_TCP == -1) { log.fatal( "Neither UDP nor TCP configured" ); System.exit( 1 ); -- cgit v1.2.3-55-g7522