I am using resource filtering to replace some ${values} in a property file.
e.g. the file contains PROPERTY=${VALUE}
I want ${VALUE} to be replaced with environment variable $VALUE which works well if $VALUE is set when the build runs. Awesome.
However, these env vars are only set in our official build environment (by Jenkins) and not in developer builds so the ${values} are left in the property file after filtering which can break stuff. I'd rather not require env vars in developer environments as that always leads to fragile dev builds and whiny devs.
How can I use the environment variable value if its set and use another default property value if the env var isn't set?
From my testing it works the other way around by default, in that properties set in the pom will override environment variables for the purpose of resource filtering.
Thanks