title: Spring boot exclude properties file and provide it to jar on execution
body: <p>I have multiple set of properties file smtp, db, common settings under src/main/resources directory and my project is maven project jar packaging. I want to exclude all these properties file from jar building and place all these properties files to target/conf folder. Now i want to provide all these configuration file to my jar when i execute application jar. 
  How to achieve this? I have done couple of things in pom.xml file to exclude all these properties and now unable to provide them to the generated jar. 
  This is for exclude src/main/resources content</p>
  
  <pre><code>&lt;resources&gt;
      &lt;resource&gt;
          &lt;directory&gt;src/main/resources&lt;/directory&gt;
          &lt;excludes&gt;
              &lt;exclude&gt;*.properties&lt;/exclude&gt;
          &lt;/excludes&gt;
          &lt;filtering&gt;false&lt;/filtering&gt;
      &lt;/resource&gt;
  &lt;/resources&gt;
  </code></pre>
  
  <p>Spring boot Plugin configuration</p>
  
  <pre><code>&lt;plugin&gt;
      &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
      &lt;artifactId&gt;spring-boot-maven-plugin&lt;/artifactId&gt;
      &lt;configuration&gt;
          &lt;executable&gt;true&lt;/executable&gt;
      &lt;/configuration&gt;
  &lt;/plugin&gt;
  </code></pre>
  
  <p>Maven resources plugin to place all the resources files under target/conf folder</p>
  
  <pre><code>&lt;plugin&gt;
      &lt;artifactId&gt;maven-resources-plugin&lt;/artifactId&gt;
      &lt;version&gt;2.6&lt;/version&gt;
      &lt;executions&gt;
          &lt;execution&gt;
              &lt;id&gt;copy-resources&lt;/id&gt;
              &lt;phase&gt;validate&lt;/phase&gt;
              &lt;goals&gt;
                  &lt;goal&gt;copy-resources&lt;/goal&gt;
              &lt;/goals&gt;
              &lt;configuration&gt;
                  &lt;outputDirectory&gt;target/conf&lt;/outputDirectory&gt;
                  &lt;resources&gt;
                      &lt;resource&gt;
                          &lt;directory&gt;src/main/resources&lt;/directory&gt;
                      &lt;/resource&gt;
                  &lt;/resources&gt;
              &lt;/configuration&gt;
          &lt;/execution&gt;
      &lt;/executions&gt;
  &lt;/plugin&gt;
  </code></pre>