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<
To elaborate on edbrannin's alternate solution:
4.0.0
com.yourcompany
yourproject
1.0-SNAPSHOT
maven-antrun-plugin
checkParam
initialize
run
will give you the following output:
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] An Ant BuildException has occured: 'env' property must be set
IMHO the most straightforward way to do it (the one I'd go for personally).
You could even control a set of allowed values using a nested containing and tags (see the Ant manual: http://ant.apache.org/manual/Tasks/conditions.html)