From 1140536f6d2f97658c97cadb0c9546df8061d541 Mon Sep 17 00:00:00 2001 From: Florian Zschocke Date: Thu, 7 Nov 2019 19:54:41 +0100 Subject: [PATCH] Report Java versions used during build and server start. With three versions about to be supported right now it is getting more important to know which Java version is used when building and testing Gitblit, and which Java version is used to run Gitblit. So have the Moxie build report the javac version, and the JVM version that Moxie is running on. These might be different. The `GitBlitServer` will print the Java version and vendor, so that it gets visible if a user would paste a log output for analysis. --- build.xml | 7 +++++++ src/main/java/com/gitblit/GitBlitServer.java | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/build.xml b/build.xml index 4db5d9f1..8787623b 100644 --- a/build.xml +++ b/build.xml @@ -53,6 +53,13 @@ + + + JDK version: ${ant.java.version} + + + + Java/JVM version: ${java.version} diff --git a/src/main/java/com/gitblit/GitBlitServer.java b/src/main/java/com/gitblit/GitBlitServer.java index acdc2c26..e006e2c8 100644 --- a/src/main/java/com/gitblit/GitBlitServer.java +++ b/src/main/java/com/gitblit/GitBlitServer.java @@ -225,6 +225,10 @@ public class GitBlitServer { String osversion = System.getProperty("os.version"); logger.info("Running on " + osname + " (" + osversion + ")"); + String javaversion = System.getProperty("java.version"); + String javavendor = System.getProperty("java.vendor"); + logger.info("JVM version " + javaversion + " (" + javavendor + ")"); + QueuedThreadPool threadPool = new QueuedThreadPool(); int maxThreads = settings.getInteger(Keys.server.threadPoolSize, 50); if (maxThreads > 0) { -- 2.39.5