title: Maven warn or fail goal when resource filtering cannot find a property
body: <p>I am starting to work on a poorly documented Maven project. I have set up my profile for the project but I may or may not be missing property definitions that used during resource filtering. By default, if a property is not defined in a filtered file, the variable name is left in the copied resource and Maven continues silently.</p>
  
  <p>Is there a way to force Maven to fast-fail in this case?</p>
  
  <p>As a minimal example, take this pom,</p>
  
  <pre><code> &lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"&gt;
    &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
    &lt;groupId&gt;com.mycompany.app&lt;/groupId&gt;
    &lt;artifactId&gt;my-app&lt;/artifactId&gt;
    &lt;packaging&gt;jar&lt;/packaging&gt;
    &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
    &lt;name&gt;my-app&lt;/name&gt;
   &lt;build&gt;
    &lt;resources&gt;
     &lt;resource&gt;
      &lt;directory&gt;src/main/resources&lt;/directory&gt;
      &lt;filtering&gt;true&lt;/filtering&gt;
     &lt;/resource&gt;
    &lt;/resources&gt;
   &lt;/build&gt;
   &lt;profiles&gt;
    &lt;profile&gt;
     &lt;id&gt;production&lt;/id&gt;
     &lt;properties&gt;
      &lt;foo&gt;Craig&lt;/foo&gt;
     &lt;/properties&gt;
    &lt;/profile&gt;
   &lt;/profiles&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>And have a resource to filter:</p>
  
  <pre><code> echo 'Hello, my name is ${foo}!' &gt; src/main/resources/test
  </code></pre>
  
  <p>Then running <code>mvn clean install -Pproduction</code> produces a file that says <code>Hello, my name is Craig!</code> while running <code>mvn clean install</code> produces a file that says <code>Hello, my name is ${foo}!</code>. </p>
  
  <p>So my question is; how do I force Maven to fail in the second case?</p>