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<
Maybe you could use such a workaround: in Maven you can activate a profile if some property is not set:
...
failure_profile
!env
Then you shall force this profile always fail, e.g. using maven-enforcer-plugin:
failure_profile
...
org.apache.maven.plugins
maven-enforcer-plugin
enforce
enforce
true
If you don't provide -Denv build will then fail:
[INFO] [enforcer:enforce {execution: enforce}]
[WARNING] Rule 0: org.apache.maven.plugins.enforcer.AlwaysFail failed with message:
Always fails!
[INFO] ---------------------------------------------------------
[ERROR] BUILD ERROR
Well, it's much more verbose then Ant, but pure Maven :)