Idiom for setting a property from an environment variable, or default?

Erik Hatcher

Remember, properties are immutable:

  <property environment="env"/>
  <property name="env.FOO_HOME" location="c:/foo"/>
  <property name="foo.home" location="${env.FOO_HOME}"/>
That last line is not needed if you want to use ${env.FOO_HOME}, but its nicer to have a ${foo.home} property.
About | Sitemap | Contact
We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.