title: Adding JAR in the resources folder to classpath in maven
body: <p>I had two jars in resources folder with that i build my project to jar(say <code>editor.jar</code>) using maven.
  My class File Does not have dependencies to this jars while at building.</p>
  
  <p>But When i run the editor.jar using command <code>java -jar editor.jar</code>
  it needs the any one of jar in the lib folder as its dependency.</p>
  
  <p>so i need to add these to jar into the classpath . i read in the same webesite in this <a href="https://stackoverflow.com/questions/9063296/how-can-i-write-maven-build-to-add-resources-to-classpath">question</a> :  but it is not worked for me.</p>
  
  <p>My directory looks like this:</p>
  
  <p><a href="https://i.stack.imgur.com/VtaqK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VtaqK.png" alt=""></a></p>
  
  <p>what i done so far in my pom.xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &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/xsd/maven-4.0.0.xsd"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
      &lt;groupId&gt;editor&lt;/groupId&gt;
      &lt;artifactId&gt;editor&lt;/artifactId&gt;
      &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
  
      &lt;build&gt;
          &lt;finalName&gt;editor&lt;/finalName&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;source&gt;1.8&lt;/source&gt;
                      &lt;target&gt;1.8&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-jar-plugin&lt;/artifactId&gt;
                  &lt;configuration&gt;
                      &lt;archive&gt;
                          &lt;manifest&gt;
                              &lt;addClasspath&gt;true&lt;/addClasspath&gt;
                              &lt;mainClass&gt;Jdbc&lt;/mainClass&gt;
                          &lt;/manifest&gt;
                          &lt;manifestEntries&gt;
                              &lt;Class-Path&gt;lib/*.jar&lt;/Class-Path&gt;
                          &lt;/manifestEntries&gt;
                      &lt;/archive&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>How to add the two jars to classpath and make execute the editor.jar ?</p>