title: How to make a runnable jar of my maven project?
body: <p>I want to make a jar file of my project but it shows error when I try to make jar.</p>
  
  <p><strong>Till now</strong>, I build a jar that is executed by using a command , </p>
  
  <p><code>java -cp &lt;JAR FILE&gt; &lt;MAIN CLASS NAME&gt;</code>.</p>
  
  <p>I have done this by adding plugin in the POM, </p>
  
  <pre><code>&lt;plugin&gt; 
  &lt;artifactId&gt;maven-assembly-plugin&lt;/artifactId&gt; 
  &lt;configuration&gt; 
  &lt;descriptorRefs&gt; 
  &lt;descriptorRef&gt;jar-with-dependencies&lt;/descriptorRef&gt; 
  &lt;/descriptorRefs&gt; 
  &lt;/configuration&gt; 
  &lt;/plugin&gt;
  </code></pre>
  
  <p>and by running command , <code>mvn clean</code> and <code>mvn install assembly:assembly</code>.</p>
  
  <p><strong>But I want</strong> a jar, that will run by using command <code>java -jar &lt;JAR FILE&gt;</code></p>
  
  <p>For that I read <a href="http://www.itcuties.com/tools/maven-custom-manifest-file/" rel="nofollow">this link</a> and implemented also. But it shows below error, </p>
  
  <pre><code>[ERROR] Failed to execute goal org.apache.maven.plugins:maven-jar-plugin:2.4:jar (default-jar) on project ThreadPool: Unable to parse configuration of mojo org.apache.maven.plugins:maven-jar-plugin:2.4:jar for parameter manifest: Cannot find setter, adder nor field in org.apache.maven.archiver.ManifestConfiguration for 'addClassPath' -&gt; [Help 1] 
  </code></pre>
  
  <p>Please help me making jar file, that executes by using <code>java -jar</code> command.
  Thanks in advance . Looking for your kind response.</p>
  
  <p><strong>EDIT NO 1</strong></p>
  
  <p>I added below plugins, dependency in POM,</p>
  
  <pre><code>&lt;!-- Example dependency --&gt;
  &lt;dependencies&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;commons-lang&lt;/groupId&gt;
          &lt;artifactId&gt;commons-lang&lt;/artifactId&gt;
          &lt;version&gt;2.1&lt;/version&gt;
      &lt;/dependency&gt;
  &lt;/dependencies&gt;
  ...
  &lt;build&gt;
      &lt;plugins&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;/manifest&gt;
                  &lt;/archive&gt;
              &lt;/configuration&gt;  
          &lt;/plugin&gt;
      &lt;/plugins&gt;
  &lt;/build&gt;
  </code></pre>