title: Maven profile filter works when building WAR but not in Tomcat7 run
body: <p>I'm trying to use Maven to pull in a different config point within my web.xml file in dev and production. It looks like using profiles and filters is the way to go, and this does in fact work when I build the WAR file with "mvn install" or "mvn package." However, running it via the Tomcat 7 plugin, always results in a "cannot resolve placeholder" error. Here are the relevant lines:</p>
  
  <p>in web.xml - this is the placeholder I'm trying to set</p>
  
  <pre><code>/WEB-INF/${sec-file-path}
  </code></pre>
  
  <p>in pom.xml</p>
  
  <pre><code>&lt;profiles&gt;
      &lt;profile&gt;
          &lt;id&gt;development&lt;/id&gt;
          &lt;properties&gt;
              &lt;sec-file-path&gt;one-thing-for-dev.xml&lt;/sec-file-path&gt;
          &lt;/properties&gt;
      &lt;/profile&gt;
      &lt;profile&gt;
          &lt;id&gt;production&lt;/id&gt;
          &lt;properties&gt;
              &lt;sec-file-path&gt;one-thing-for-prod.xml&lt;/sec-file-path&gt;
          &lt;/properties&gt;
      &lt;/profile&gt;
  &lt;/profiles&gt;
  
  ....
  
          &lt;plugin&gt;
              &lt;groupId&gt;org.apache.tomcat.maven&lt;/groupId&gt;
              &lt;artifactId&gt;tomcat7-maven-plugin&lt;/artifactId&gt;
              &lt;version&gt;2.0&lt;/version&gt;
          &lt;/plugin&gt;
  
          &lt;plugin&gt;
              &lt;artifactId&gt; maven-war-plugin &lt;/artifactId&gt;
              &lt;version&gt;2.4&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;webResources&gt;
                      &lt;resource&gt;
                          &lt;filtering&gt;true&lt;/filtering&gt;
                          &lt;directory&gt;src/main/webapp&lt;/directory&gt;
                          &lt;includes&gt;
                              &lt;include&gt;**/web.xml&lt;/include&gt;
                          &lt;/includes&gt;
                      &lt;/resource&gt;
                  &lt;/webResources&gt;
                  &lt;warSourceDirectory&gt;src/main/webapp&lt;/warSourceDirectory&gt;
                  &lt;webXml&gt;src/main/webapp/WEB-INF/web.xml&lt;/webXml&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
  </code></pre>
  
  <p>Running the command  "mvn package -P development" works as expected and fills in the placeholder appropriately. However, running  "mvn tomcat7:run -P development" results results in a "cannot resolve placeholder" error. Any suggestions would be welcome. </p>