title: Maven resources filtering
body: <p>I would like to write out build informations to a property file. I have found Maven resource filtering plugin. And this is how my pom relevant part looks like:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &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;parent&gt;
          &lt;groupId&gt;project.mygroup&lt;/groupId&gt;
          &lt;artifactId&gt;prject&lt;/artifactId&gt;
          &lt;version&gt;1.0-20190130-1&lt;/version&gt;
      &lt;/parent&gt;
  
      &lt;artifactId&gt;project-war&lt;/artifactId&gt;
      &lt;packaging&gt;war&lt;/packaging&gt;
      &lt;version&gt;1.0-20190130-1&lt;/version&gt;
  
      &lt;properties&gt;
  
          &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
  
          &lt;timestamp&gt;${maven.build.timestamp}&lt;/timestamp&gt;
          &lt;maven.build.timestamp.format&gt;
          yyy-MM-dd HH:mm
          &lt;/maven.build.timestamp.format&gt;
  
      &lt;/properties&gt;
  
      &lt;dependencies&gt;
      ...
      &lt;/dependencies&gt;
  
      &lt;build&gt;
          &lt;finalName&gt;project&lt;/finalName&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;plugins&gt;
              &lt;!-- Create war from the project --&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-war-plugin&lt;/artifactId&gt;
  
              &lt;/plugin&gt;
  
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.3.2&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;encoding&gt;${project.build.sourceEncoding}&lt;/encoding&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-resources-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.4.3&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;encoding&gt;${project.build.sourceEncoding}&lt;/encoding&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;    
  
  &lt;/project&gt;
  </code></pre>
  
  <p>If start <code>mvn clean package</code> the build is success, but my <code>build.properties</code> file under src/main/resources will not contain the build informations.</p>
  
  <p>My property file looks like this:</p>
  
  <pre><code>build.version=${pom.version}
  build.date=${timestamp}
  build.url=${pom.url}
  build.name=${pom.name}
  </code></pre>
  
  <p>What am I doing wrong? Thank you!</p>