Values for os.family in Maven profile activation condition

前端 未结 4 1039
萌比男神i
萌比男神i 2021-02-12 11:01

Maven allows to activate certain build profiles based on the operating system family it runs on, for example:



        
4条回答
  •  天涯浪人
    2021-02-12 11:20

    OS family values:

    dos
    mac
    netware
    os/2
    tandem
    unix
    windows
    win9x
    z/os
    os/400
    openvms
    

    Other value you can get by run simple program:

    public class SystemProperties {
        public static void main(String[] args) {
            System.out.println("Os name: " + System.getProperty("os.name"));
            System.out.println("Os arch: " + System.getProperty("os.arch"));
            System.out.println("Os version: " + System.getProperty("os.version"));
        }
    }
    

提交回复
热议问题