mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-12-26 10:28:05 +01:00
Add more build parameters (time, java).
This commit is contained in:
parent
e1adb3db54
commit
2a9e00b4ae
@ -30,6 +30,11 @@
|
|||||||
|
|
||||||
Version updating is done for NCPPlugin mainly, expect the other poms version to change randomly rather.</description>
|
Version updating is done for NCPPlugin mainly, expect the other poms version to change randomly rather.</description>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<maven.build.timestamp.format>yyyy_MM_dd-HH_mm</maven.build.timestamp.format>
|
||||||
|
<buildTimestamp>${maven.build.timestamp}</buildTimestamp>
|
||||||
|
</properties>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
<resources>
|
<resources>
|
||||||
<resource>
|
<resource>
|
||||||
|
@ -4,7 +4,7 @@ import java.util.HashMap;
|
|||||||
import java.util.Map;
|
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
|
* @author mc_dev
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@ -72,10 +72,16 @@ public class BuildParameters {
|
|||||||
// Public members.
|
// 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);
|
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);
|
public static final int debugLevel = getInteger("DEBUG_LEVEL", 0);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,18 @@
|
|||||||
# These parameters are filled in during building (maven), they are not strictly needed.
|
# These parameters are filled in during building (maven), they are not strictly needed.
|
||||||
# Replacement mappings are defined in the pom.xml.
|
# 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}
|
TEST_LEVEL=${TEST_LEVEL}
|
||||||
DEBUG_LEVEL=${DEBUG_LEVEL}
|
DEBUG_LEVEL=${DEBUG_LEVEL}
|
Loading…
Reference in New Issue
Block a user