diff --git a/NCPBuildBase/pom.xml b/NCPBuildBase/pom.xml
index 81e36b92..2eabf70f 100644
--- a/NCPBuildBase/pom.xml
+++ b/NCPBuildBase/pom.xml
@@ -30,6 +30,11 @@
Version updating is done for NCPPlugin mainly, expect the other poms version to change randomly rather.
+
+ yyyy_MM_dd-HH_mm
+ ${maven.build.timestamp}
+
+
diff --git a/NCPBuildBase/src/main/java/fr/neatmonster/nocheatplus/utilities/build/BuildParameters.java b/NCPBuildBase/src/main/java/fr/neatmonster/nocheatplus/utilities/build/BuildParameters.java
index e8d5efbd..d6eb9c76 100644
--- a/NCPBuildBase/src/main/java/fr/neatmonster/nocheatplus/utilities/build/BuildParameters.java
+++ b/NCPBuildBase/src/main/java/fr/neatmonster/nocheatplus/utilities/build/BuildParameters.java
@@ -4,7 +4,7 @@ import java.util.HashMap;
import java.util.Map;
/**
- * Experimental support for build parameters.
+ * Support for parameters present or set at building time. They are read from BuildParameters.properties
* @author mc_dev
*
*/
@@ -72,10 +72,16 @@ public class BuildParameters {
// Public members.
//////////////////////
- /** Test level: more testing for higher levels. */
+ /** Timestamp from build (maven). "?" if not present. */
+ public static final String buildTimeString = getString("BUILD_TIMESTAMP", "?");
+
+ /** The build number as given by Jenkins. Integer.MIN_VALUE if not present. */
+ public static final int buildNumber = getInteger("BUILD_NUMBER", Integer.MIN_VALUE);
+
+ /** Test level: more testing for higher levels. Defaults to 0. */
public static final int testLevel = getInteger("TEST_LEVEL", 0);
- /** Debug level: more debug output for higher levels. */
+ /** Debug level: more debug output for higher levels. Defaults to 0. */
public static final int debugLevel = getInteger("DEBUG_LEVEL", 0);
}
diff --git a/NCPBuildBase/src/main/resources/BuildParameters.properties b/NCPBuildBase/src/main/resources/BuildParameters.properties
index faa71b42..0d120994 100644
--- a/NCPBuildBase/src/main/resources/BuildParameters.properties
+++ b/NCPBuildBase/src/main/resources/BuildParameters.properties
@@ -1,4 +1,18 @@
# These parameters are filled in during building (maven), they are not strictly needed.
# Replacement mappings are defined in the pom.xml.
+
+# ---- Build details ----
+BUILD_TIMESTAMP=${buildTimestamp}
+BUILD_NUMBER=${BUILD_NUMBER}
+
+# ---- Java ----
+JAVA_VENDOR=${java.vendor}
+JAVA_VERSION=${java.version}
+JAVA_VM_VENDOR=${java.vm.vendor}
+JAVA_VM_VERSION=${java.vm.version}
+JAVA_SPECIFICATION_VENDOR=${java.specification.vendor}
+JAVA_SPECIFICATION_VERSION=${java.specification.version}
+
+# ---- Parameters used at runtime ----
TEST_LEVEL=${TEST_LEVEL}
DEBUG_LEVEL=${DEBUG_LEVEL}
\ No newline at end of file