title: Why does maven not copy the properties files during the build process?
body: <p>Nothing I've found has been able to help me solve this one specific case. I recently switched from a plain old java web app project (which was working) to a maven web project. I get the following runtime exception:</p>
  
  <pre><code>java.util.MissingResourceException: Can't find bundle for base name com.myapp.config, locale en
  </code></pre>
  
  <p>I am using Netbeans to create a JSF 2.0, Spring, and Hibernate web app. I have the following directory structure:</p>
  
  <blockquote>
    <p>src\main\java\com\myapp &nbsp;&nbsp;&nbsp;&nbsp;Contains config.properties<br/>
    src\main\resources &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Empty<br/><br/>
    target\myapp\WEB-INF\classes\com\myapp &nbsp;&nbsp;&nbsp;&nbsp;Contains compiled class files without config.properties<br/>
    src\main\java\com\myapp &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Contains config.properties<br/></p>
  </blockquote>
  
  <p>Inspection of the WAR file in the target folder does not show any sign of the properties file so it's as if the Maven build plug-in is not copying over properties files. I know there is a  tag you can place inside the pom but it didn't work for me. The link below mentions that the resources folder (empty for me) has its contents included during the build but if that is the case, how do you do it from Netbeans? I just want the properties file to be packaged with my war so it is accessible when it is deployed to the server. <br/><br/>
  <a href="http://maven.apache.org/plugins/maven-war-plugin/examples/adding-filtering-webresources.html">http://maven.apache.org/plugins/maven-war-plugin/examples/adding-filtering-webresources.html</a></p>
  
  <p>pom.xml:</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.myapp&lt;/groupId&gt;
  &lt;artifactId&gt;myapp&lt;/artifactId&gt;
  &lt;packaging&gt;war&lt;/packaging&gt;
  &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
  &lt;name&gt;myapp&lt;/name&gt;
  &lt;url&gt;http://maven.apache.org&lt;/url&gt;
  &lt;repositories&gt;
      &lt;repository&gt;
          &lt;id&gt;java.net&lt;/id&gt;
          &lt;name&gt;Repository hosting the Java EE 6 artifacts&lt;/name&gt;
          &lt;url&gt;http://download.java.net/maven/2&lt;/url&gt;
      &lt;/repository&gt;
  &lt;/repositories&gt;
  &lt;dependencies&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;javax.faces&lt;/groupId&gt;
          &lt;artifactId&gt;jsf-api&lt;/artifactId&gt;
          &lt;version&gt;2.1&lt;/version&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;javax&lt;/groupId&gt;
          &lt;artifactId&gt;javaee-web-api&lt;/artifactId&gt;
          &lt;version&gt;6.0&lt;/version&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-hibernate3&lt;/artifactId&gt;
          &lt;version&gt;2.0.8&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.amazonaws&lt;/groupId&gt;
          &lt;artifactId&gt;aws-java-sdk&lt;/artifactId&gt;
          &lt;version&gt;1.1.8&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;net.authorize&lt;/groupId&gt;
          &lt;artifactId&gt;java-anet-sdk&lt;/artifactId&gt;
          &lt;version&gt;1.4.2&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;mysql&lt;/groupId&gt;
          &lt;artifactId&gt;mysql-connector-java&lt;/artifactId&gt;
          &lt;version&gt;5.1.15&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;junit&lt;/groupId&gt;
          &lt;artifactId&gt;junit&lt;/artifactId&gt;
          &lt;version&gt;3.8.2&lt;/version&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
  &lt;/dependencies&gt;
  &lt;build&gt;
      &lt;plugins&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;source&gt;1.6&lt;/source&gt;
                  &lt;target&gt;1.6&lt;/target&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-war-plugin&lt;/artifactId&gt;
              &lt;version&gt;2.1.1&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;failOnMissingWebXml&gt;false&lt;/failOnMissingWebXml&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
      &lt;/plugins&gt;
      &lt;finalName&gt;${artifactId}&lt;/finalName&gt;
  &lt;/build&gt;
  &lt;profiles&gt;
      &lt;profile&gt;
          &lt;id&gt;endorsed&lt;/id&gt;
          &lt;activation&gt;
              &lt;property&gt;
                  &lt;name&gt;sun.boot.class.path&lt;/name&gt;
              &lt;/property&gt;
          &lt;/activation&gt;
          &lt;build&gt;
              &lt;plugins&gt;
                  &lt;plugin&gt;
                      &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                      &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
                      &lt;configuration&gt;
                          &lt;!-- javaee6 contains upgrades of APIs contained within the JDK itself.
                               As such these need to be placed on the bootclasspath, rather than classpath of the
                               compiler.
                               If you don't make use of these new updated API, you can delete the profile.
                               On non-SUN jdk, you will need to create a similar profile for your jdk, with the similar property as sun.boot.class.path in Sun's JDK.--&gt;
                          &lt;compilerArguments&gt;
                              &lt;bootclasspath&gt;${settings.localRepository}/javax/javaee-endorsed-api/6.0/javaee-endorsed-api-6.0.jar${path.separator}${sun.boot.class.path}&lt;/bootclasspath&gt;
                          &lt;/compilerArguments&gt;
                      &lt;/configuration&gt;
                      &lt;dependencies&gt;
                          &lt;dependency&gt;
                              &lt;groupId&gt;javax&lt;/groupId&gt;
                              &lt;artifactId&gt;javaee-endorsed-api&lt;/artifactId&gt;
                              &lt;version&gt;6.0&lt;/version&gt;
                          &lt;/dependency&gt;
                      &lt;/dependencies&gt;
                  &lt;/plugin&gt;
              &lt;/plugins&gt;
          &lt;/build&gt;
      &lt;/profile&gt;
  &lt;/profiles&gt;
  &lt;properties&gt;
      &lt;netbeans.hint.deploy.server&gt;gfv3ee6&lt;/netbeans.hint.deploy.server&gt;
  &lt;/properties&gt;
  </code></pre>
  
  <p></p>