title: Maven - How to create a POM that place files in the root
body: <p>I need to create a pom.xml file that builds a jar with certain files place on its root. The pom.xml I have now creates 3 directories BOOT-INF, META-INF and org. Below is the build section. I want the files to be at the same level as the directories (BOOT-INF, META-INF, org).</p>
  <p><a href="https://i.stack.imgur.com/3yc19.jpg" rel="nofollow noreferrer">sparc-jar.jpg</a>
  </p>
  <pre><code>&lt;plugins&gt;
  
                      &lt;plugin&gt;
                          &lt;groupId&gt;oerg.apache.maven.plugins&lt;/groupId&gt;
                          &lt;artifactId&gt;maven-resources-plugin&lt;/artifactId&gt;
                          &lt;version&gt;3.1.0&lt;/version&gt;
                      &lt;/plugin&gt;
  
                      &lt;plugin&gt;
                          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
                          &lt;artifactId&gt;spring-boot-maven-plugin&lt;/artifactId&gt;
                          &lt;executions&gt;
                              &lt;execution&gt;
                                  &lt;goals&gt;
                                      &lt;goal&gt;build-info&lt;/goal&gt;
                                  &lt;/goals&gt;
                              &lt;/execution&gt;
                          &lt;/executions&gt;
                      &lt;/plugin&gt;
  
      &lt;/plugins&gt;
  
      &lt;resources&gt;
          &lt;resource&gt;
              &lt;directory&gt;src/main/resources&lt;/directory&gt;
              &lt;includes&gt;
                  &lt;include&gt;**/*.sh&lt;/include&gt;
                  &lt;include&gt;**/*.id&lt;/include&gt;
                  &lt;include&gt;**/*.yaml&lt;/include&gt;
                  &lt;include&gt;**/*.json&lt;/include&gt;
                  &lt;include&gt;**/*.properties&lt;/include&gt;
                  &lt;include&gt;**/*.xml&lt;/include&gt;
                  &lt;include&gt;**/*.jar&lt;/include&gt;
                  &lt;include&gt;**/*.js&lt;/include&gt;
                  &lt;include&gt;**/*.map&lt;/include&gt;
                  &lt;include&gt;**/*.html&lt;/include&gt;
                  &lt;include&gt;**/*.hbs&lt;/include&gt;
                  &lt;include&gt;**/*.cer&lt;/include&gt;
                  &lt;include&gt;**/*.p12&lt;/include&gt;
              &lt;/includes&gt;
          &lt;/resource&gt;
  
          &lt;resource&gt;
              &lt;directory&gt;.&lt;/directory&gt;
              &lt;includes&gt;
                  &lt;include&gt;**/*.yaml&lt;/include&gt;
                  &lt;include&gt;**/*.json&lt;/include&gt;
                  &lt;include&gt;**/*.properties&lt;/include&gt;
                  &lt;include&gt;**/*.xml&lt;/include&gt;
                  &lt;include&gt;**/*.cer&lt;/include&gt;
                  &lt;include&gt;**/*.p12&lt;/include&gt;
              &lt;/includes&gt;
          &lt;/resource&gt;
      &lt;/resources&gt;
  &lt;/build&gt;
  </code></pre>