title: maven resources plugin - How to filter from external file?
body: <p>I need to configure some <code>log4j2.xml</code> file based on some properties and those properties vary according to the environment. For example I set <code>log.org.hibernate=info</code> for development and <code>log.org.hibernate=error</code> for production etc.</p>
  
  <p>I'm using maven resources plugin as shown below and it's working fine. </p>
  
  <pre><code>&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;filters&gt;
      &lt;filter&gt;${project.basedir}/src/main/resources/env/prod.properties&lt;/filter&gt;
  &lt;/filters&gt;
  </code></pre>
  
  <p>Now I need to filter external properties file and set those properties to the same <code>log4j2.xml</code> file. But AFAIK resources plugin doesn't allow external file filtering.</p>
  
  <p>How can I read the properties from external properties file (outside of my project directory) and set them to an inner resource (such as <code>log4j2.xml</code> file)?</p>