Package org.apache.maven.utils
Class Os
- java.lang.Object
-
- org.apache.maven.utils.Os
-
public class Os extends java.lang.ObjectOS support
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.StringDARWINOpenJDK is reported to call MacOS X "Darwin"private static java.lang.StringFAMILY_DOSOS family that can be tested for.private static java.lang.StringFAMILY_MACOS family that can be tested for.private static java.lang.StringFAMILY_NETWAREOS family that can be tested for.static java.lang.StringFAMILY_NTOS family that can be tested for.private static java.lang.StringFAMILY_OPENVMSOS family that can be tested for.private static java.lang.StringFAMILY_OS2OS family that can be tested for.private static java.lang.StringFAMILY_OS390OS family that can be tested for.private static java.lang.StringFAMILY_OS400OS family that can be tested for.private static java.lang.StringFAMILY_TANDEMOS family that can be tested for.private static java.lang.StringFAMILY_UNIXOS family that can be tested for.private static java.lang.StringFAMILY_WIN9XOS family that can be tested for.private static java.lang.StringFAMILY_WINDOWSOS family that can be tested for.private static java.lang.StringFAMILY_ZOSOS family that can be tested for.static booleanIS_WINDOWSBoolean indicating if the running OS is a Windows system.static java.lang.StringOS_ARCHThe OA architecture.static java.lang.StringOS_FAMILYOS Familystatic java.lang.StringOS_NAMEThe OS Name.static java.lang.StringOS_VERSIONThe OS version.private static java.lang.StringPATH_SEPThe path separator.
-
Constructor Summary
Constructors Modifier Constructor Description privateOs()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static java.lang.StringgetOsFamily()Helper method to determine the current OS family.static booleanisFamily(java.lang.String family)Determines if the OS on which Maven is executing matches the given OS family.static booleanisFamily(java.lang.String family, java.lang.String actualOsName)Determines if the OS on which Maven is executing matches the given OS family derived from the given OS name
-
-
-
Field Detail
-
OS_NAME
public static final java.lang.String OS_NAME
The OS Name.
-
OS_ARCH
public static final java.lang.String OS_ARCH
The OA architecture.
-
OS_VERSION
public static final java.lang.String OS_VERSION
The OS version.
-
OS_FAMILY
public static final java.lang.String OS_FAMILY
OS Family
-
IS_WINDOWS
public static final boolean IS_WINDOWS
Boolean indicating if the running OS is a Windows system.
-
FAMILY_WINDOWS
private static final java.lang.String FAMILY_WINDOWS
OS family that can be tested for. "windows"- See Also:
- Constant Field Values
-
FAMILY_WIN9X
private static final java.lang.String FAMILY_WIN9X
OS family that can be tested for. "win9x"- See Also:
- Constant Field Values
-
FAMILY_NT
public static final java.lang.String FAMILY_NT
OS family that can be tested for. "winnt"- See Also:
- Constant Field Values
-
FAMILY_OS2
private static final java.lang.String FAMILY_OS2
OS family that can be tested for. "os/2"- See Also:
- Constant Field Values
-
FAMILY_NETWARE
private static final java.lang.String FAMILY_NETWARE
OS family that can be tested for. "netware"- See Also:
- Constant Field Values
-
FAMILY_DOS
private static final java.lang.String FAMILY_DOS
OS family that can be tested for. "dos"- See Also:
- Constant Field Values
-
FAMILY_MAC
private static final java.lang.String FAMILY_MAC
OS family that can be tested for. "mac"- See Also:
- Constant Field Values
-
FAMILY_TANDEM
private static final java.lang.String FAMILY_TANDEM
OS family that can be tested for. "tandem"- See Also:
- Constant Field Values
-
FAMILY_UNIX
private static final java.lang.String FAMILY_UNIX
OS family that can be tested for. "unix"- See Also:
- Constant Field Values
-
FAMILY_OPENVMS
private static final java.lang.String FAMILY_OPENVMS
OS family that can be tested for. "openvms"- See Also:
- Constant Field Values
-
FAMILY_ZOS
private static final java.lang.String FAMILY_ZOS
OS family that can be tested for. "z/os"- See Also:
- Constant Field Values
-
FAMILY_OS390
private static final java.lang.String FAMILY_OS390
OS family that can be tested for. "os/390"- See Also:
- Constant Field Values
-
FAMILY_OS400
private static final java.lang.String FAMILY_OS400
OS family that can be tested for. "os/400"- See Also:
- Constant Field Values
-
DARWIN
private static final java.lang.String DARWIN
OpenJDK is reported to call MacOS X "Darwin"- See Also:
- bugzilla issue, HADOOP-3318, Constant Field Values
-
PATH_SEP
private static final java.lang.String PATH_SEP
The path separator.
-
-
Method Detail
-
isFamily
public static boolean isFamily(java.lang.String family)
Determines if the OS on which Maven is executing matches the given OS family.- Parameters:
family- the family to check for- Returns:
- true if the OS matches
-
isFamily
public static boolean isFamily(java.lang.String family, java.lang.String actualOsName)Determines if the OS on which Maven is executing matches the given OS family derived from the given OS name- Parameters:
family- the family to check foractualOsName- the OS name to check against- Returns:
- true if the OS matches
-
getOsFamily
private static java.lang.String getOsFamily()
Helper method to determine the current OS family.- Returns:
- name of current OS family.
-
-