Class Os

java.lang.Object
org.apache.maven.utils.Os

public class Os extends Object
OS support
  • Field Details Link icon

    • OS_NAME Link icon

      public static final String OS_NAME
      The OS Name.
    • OS_ARCH Link icon

      public static final String OS_ARCH
      The OA architecture.
    • OS_VERSION Link icon

      public static final String OS_VERSION
      The OS version.
    • OS_FAMILY Link icon

      public static final String OS_FAMILY
      OS Family
    • IS_WINDOWS Link icon

      public static final boolean IS_WINDOWS
      Boolean indicating if the running OS is a Windows system.
    • FAMILY_NT Link icon

      public static final String FAMILY_NT
      OS family that can be tested for. "winnt"
      See Also:
  • Method Details Link icon

    • isFamily Link icon

      public static boolean isFamily(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 Link icon

      public static boolean isFamily(String family, 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 for
      actualOsName - the OS name to check against
      Returns:
      true if the OS matches