I'm setting up a maven build, and the destination server needs to be specified on the command line as a property (which is then used to select the appropriate profile), eg
mvn -Denv=test
I'd like the build to fail if the property's not set - is that possible?
Yes, I'm a Maven newbie.
EDIT: I've seen this link, which seems to imply it's not possible, but am not sure how up to date it is.
Everyone is close, but there's a rule in the enforcer to specifically check for a property, no ant or funky profiles required: http://maven.apache.org/enforcer/enforcer-rules/requireProperty.html
The rule can also check the value of the property.
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