Values for os.family in Maven profile activation condition

前端 未结 4 1042
萌比男神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:16

    A very useful Maven command for checking these OS properties on your machine:

    mvn enforcer:display-info
    

    Example output on a SunOS / Sparc host:

    [INFO] Maven Version: 3.0.4
    [INFO] JDK Version: 1.6.0_34 normalized as: 1.6.0-34
    [INFO] OS Info: Arch: sparc Family: unix Name: sunos Version: 5.8
    

    Example output on a Linux host:

    [INFO] Maven Version: 3.0.4
    [INFO] JDK Version: 1.7.0_85 normalized as: 1.7.0-85
    [INFO] OS Info: Arch: amd64 Family: unix Name: linux Version: 2.6.32-504.23.4.el6.x86_64
    

提交回复
热议问题