title: How to Exclude properties file from jar file?
body: <p>I have a java application with the following project structure:</p>
  
  <pre><code>myProject
    |
    |----src
    |     |
    |     |--main
    |     |
    |     |--resources
    |           |   
    |           |--userConfig.properties
    |           |--log4j.properties
    |
    |---target
  </code></pre>
  
  <p>I am using <code>Maven</code> to build my project. I am using <code>maven</code> command to build jar file as follows:</p>
  
  <pre><code>mvn package -DMaven.test.skip=true
  </code></pre>
  
  <p>I want to exclude <code>userConfig.properties</code> file from my JAR file so I have updated my <code>pom.xml</code> as follows:</p>
  
  <pre><code>&lt;excludes&gt;
      &lt;exclude&gt;**/userConfig.properties&lt;/exclude&gt;
  &lt;/excludes&gt;
  </code></pre>
  
  <p>But it excludes from the target folder in which the compiled code resides.
  And the application won't run because it is unable to find the <code>userConfig.properties</code> file.</p>
  
  <p>Can anyone help me?</p>