How to set default values for missing environment variables in maven pom
<h2>Is it possible to have maven provide default values for missing environment variables? If so, how?</h2>

<hr>

<h1>Context:</h1>

<p>I have properties files with placeholders to environment variables, like this: <code>my.property=${env:ENVIRONMENT_PROPERTY}</code></p>

<p>Running maven (edit: not like this <code>mvn ... -DENVIRONMENT_PROPERTY=some_value</code>) if the environment variable is set in the OS makes it resolve the property placeholder with the given value. But if the environment variable does not exist, the value is blank.</p>

<h1>Problem:</h1>

<p>I would like the environment variables to have a default value. If the environment variable does not exist it should be given a default value that would be specified in the pom or some properties file or whatever.</p>

<h1>Important:</h1>

<p>The property placeholders have to point to an <strong>environment</strong> variable.</p>