Maven allows to activate certain build profiles based on the operating system family it runs on, for example:
<profile>
<activation>
<os><family>Windows</family></os>
</activation>
</profile>
There is a number of question around this: what are allowed values for os.family
then? Are they case sensitive? Does Linux come across as Unix
? Or unix
? And so on.
Where can I find information about allowed values – or, at least, where does Maven take these values from? Environment variables?
OS family values:
Other value you can get by run simple program:
The values are defined in the
plexus-utils
project, inOs.java
. You can see inisOs
that the match is case-insensitive, that the value is taken fromSystem.getProperty( "os.name" )
and that you should specifyunix
to match a Linux platform.it might worth asking from maven help:
A very useful Maven command for checking these OS properties on your machine:
Example output on a SunOS / Sparc host:
Example output on a Linux host: