Browse Source

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.
tags/r1.9.0
Florian Zschocke 4 years ago
parent
commit
1140536f6d
2 changed files with 11 additions and 0 deletions
  1. 7
    0
      build.xml
  2. 4
    0
      src/main/java/com/gitblit/GitBlitServer.java

+ 7
- 0
build.xml View File

@@ -53,6 +53,13 @@
<!-- Download links -->
<property name="gc.url" value="http://dl.bintray.com/gitblit/releases/" />
<!-- Report Java version -->
<echo>JDK version: ${ant.java.version}</echo>
<exec executable="javac">
<arg value="-version" />
</exec>
<echo>Java/JVM version: ${java.version}</echo>
</target>

+ 4
- 0
src/main/java/com/gitblit/GitBlitServer.java View File

@@ -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) {

Loading…
Cancel
Save