I'm looking for a way to look up hostname and set it as a property in Maven.
This does not work in all environments:
...
<properties>
<hostname>${env.HOSTNAME}</hostname>
</properties>
...
Any suggestions?
I'm looking for a way to look up hostname and set it as a property in Maven.
This does not work in all environments:
...
<properties>
<hostname>${env.HOSTNAME}</hostname>
</properties>
...
Any suggestions?
I ended up with a simple solution to the cross-plattform problem:
Use a groovy script to set the project property
The comment posted by user1885834 was working best for me: Create profiles for Windows and Linux and use the respective environment variables to define a new property ${hostname}, to be used anywhere.
${env.COMPUTERNAME} works for me..