Is there a way to get the machine name as ant property, for both Linux and Windows OS.
Ant properties files let you move properties out of your build. xml file. You create . properties file for all the properties that are defined outside the build file.
Properties are immutable: whoever sets a property first freezes it for the rest of the build; they are most definitely not variables. There are seven ways to set properties: By supplying both the name and one of value or location attributes.
Ant Properties are set once and then can never be overridden. That's why setting any property on the command line via a -Dproperty=value will always override anything you've set in the file; the property is set and then nothing can override it. This way: Anything set at the command line takes precedence over build.
<exec executable="hostname" outputproperty="computer.hostname"/>
will work on linux and windows
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With