public class BuildInfo
extends java.lang.Object
Contains constants for defining and accessing build info. Also acts as a base class for specific packages' classes that retrieve package build data.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
BUILD_ANT_VERSION_KEY
The key to retrieve the version of Ant used for the build.
|
static java.lang.String |
BUILD_COMPILER_KEY
The key to retrieve the compiler used for the build.
|
static java.lang.String |
BUILD_DATE_KEY
The build date, in "raw" (internal, numeric) form.
|
static java.lang.String |
BUILD_ID_DATE_FORMAT_STRING
The date format, used with java.text.SimpleDateFormat,
used to create the build ID.
|
static java.lang.String |
BUILD_ID_KEY
The build ID, really just the time in a compressed format.
|
static java.lang.String |
BUILD_OS_KEY
The key to retrieve the operating system where the build occurred.
|
static java.lang.String |
BUILD_VM_KEY
The key to retrieve the VM used for the build.
|
static java.lang.String |
BUILT_BY_KEY
The user and host where the build occurred.
|
static java.lang.String |
DATE_FORMAT_STRING
The date format, used with java.text.SimpleDateFormat,
used to write the date string to the build file.
|
Constructor and Description |
---|
BuildInfo(java.lang.String bundleName)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getBuildAntVersion()
Get the version of Ant used during the build process.
|
java.lang.String |
getBuildDate()
Get the build date, as a string, from the resource bundle.
|
java.lang.String |
getBuildID()
Get the build ID string.
|
java.lang.String |
getBuildJavaCompiler()
Get the Java compiler used during the build.
|
java.lang.String |
getBuildJavaVM()
Get the string that identifies the Java virtual machine that was
used during the build.
|
java.lang.String |
getBuildOperatingSystem()
Get the string that identifies the operating system where the build
occurred.
|
java.lang.String |
getBuildUserID()
Get the string that identifies the user who built the software.
|
static void |
makeBuildInfoBundle(java.io.File bundleFile,
java.lang.String javaCompiler,
java.lang.String antVersion)
Update the build bundle file.
|
void |
showBuildInfo(java.io.PrintStream out)
Display build information to the specified PrintStream.
|
void |
showBuildInfo(java.io.PrintWriter out)
Display build information to the specified PrintWriter.
|
public static final java.lang.String BUILD_OS_KEY
public static final java.lang.String BUILD_VM_KEY
public static final java.lang.String BUILD_COMPILER_KEY
public static final java.lang.String BUILD_ANT_VERSION_KEY
public static final java.lang.String BUILD_DATE_KEY
public static final java.lang.String BUILT_BY_KEY
public static final java.lang.String BUILD_ID_KEY
public static final java.lang.String DATE_FORMAT_STRING
public static final java.lang.String BUILD_ID_DATE_FORMAT_STRING
public BuildInfo(java.lang.String bundleName)
bundleName
- the resource bundle containing the build infopublic java.lang.String getBuildDate()
public java.lang.String getBuildUserID()
public java.lang.String getBuildOperatingSystem()
public java.lang.String getBuildID()
public java.lang.String getBuildJavaVM()
public java.lang.String getBuildJavaCompiler()
public java.lang.String getBuildAntVersion()
public static void makeBuildInfoBundle(java.io.File bundleFile, java.lang.String javaCompiler, java.lang.String antVersion) throws java.io.IOException
bundleFile
- the path to the properties filejavaCompiler
- Java compiler name, or null if not knownantVersion
- Ant version, or null if not knownjava.io.IOException
- Can't recreate file.public void showBuildInfo(java.io.PrintStream out)
out
- where to write the build informationshowBuildInfo(PrintWriter)
public void showBuildInfo(java.io.PrintWriter out)
out
- where to write the build informationshowBuildInfo(PrintStream)