title: Maven add properties file to jar file
body: <p>I am using the following plugin configuration to make a jar file and I want to include non-java src files in the same place in the output jar as described <a href="https://stackoverflow.com/questions/4509309/in-maven-how-can-i-include-non-java-src-files-in-the-same-place-in-the-output-ja">here</a>.</p>
  
  <pre><code>        &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
          &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
          &lt;configuration&gt;
              &lt;source&gt;${java.version}&lt;/source&gt;
              &lt;target&gt;${java.version}&lt;/target&gt;
              &lt;compilerArgument&gt;-Xlint:all&lt;/compilerArgument&gt;
              &lt;showWarnings&gt;true&lt;/showWarnings&gt;
              &lt;showDeprecation&gt;true&lt;/showDeprecation&gt;   
              &lt;!-- include non-java src files in the same place in the output jar --&gt;
              &lt;resources&gt;
                  &lt;resource&gt;
                      &lt;directory&gt;src/main/java&lt;/directory&gt;
                      &lt;includes&gt;
                          &lt;include&gt;**/*.properties&lt;/include&gt;
                      &lt;/includes&gt;
                      &lt;filtering&gt;true&lt;/filtering&gt;
                  &lt;/resource&gt;
              &lt;/resources&gt;                                     
          &lt;/configuration&gt;  
  </code></pre>
  
  <p>The above does not work and neither does the following:</p>
  
  <pre><code>    &lt;plugin&gt;
          &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
          &lt;artifactId&gt;maven-jar-plugin&lt;/artifactId&gt;
          &lt;configuration&gt;
              &lt;!-- include non-java src files in the same place in the output jar --&gt;
              &lt;resources&gt;
                  &lt;resource&gt;
                      &lt;directory&gt;src/main/java&lt;/directory&gt;
                      &lt;includes&gt;
                          &lt;include&gt;**/*.properties&lt;/include&gt;
                      &lt;/includes&gt;
                      &lt;filtering&gt;true&lt;/filtering&gt;
                  &lt;/resource&gt;
              &lt;/resources&gt;
          &lt;/configuration&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;configuration&gt;
              &lt;source&gt;${java.version}&lt;/source&gt;
              &lt;target&gt;${java.version}&lt;/target&gt;
              &lt;compilerArgument&gt;-Xlint:all&lt;/compilerArgument&gt;
              &lt;showWarnings&gt;true&lt;/showWarnings&gt;
              &lt;showDeprecation&gt;true&lt;/showDeprecation&gt;                    
          &lt;/configuration&gt;                
      &lt;/plugin&gt;
  </code></pre>