title: Maven2: is there a way to make the build fail in case of unknown profile parameter?
body: <p>We have three different maven2 profiles: prod, dev and test. One should be able to build with either one of those three profiles, or without any profile. In other words, following commands are acceptable:</p>
  
  <pre><code>mvn install
  mvn -Pdev install
  mvn -Ptest install
  mvn -Pprod install
  </code></pre>
  
  <p>In case someone writes for example <code>mvn -Ppord install</code>, the build must fail. Is this possible to do?</p>
  
  <p>P.s. I'm aware of <a href="http://maven.apache.org/enforcer/enforcer-rules/requireProperty.html" rel="nofollow noreferrer">http://maven.apache.org/enforcer/enforcer-rules/requireProperty.html</a> but it seems that with require property it would not be possible to allow building without profile.</p>