{"id":387,"date":"2014-08-25T19:59:45","date_gmt":"2014-08-25T19:59:45","guid":{"rendered":"http:\/\/shirishranjit.com\/blog1\/?page_id=387"},"modified":"2015-03-24T18:02:56","modified_gmt":"2015-03-24T22:02:56","slug":"maven-single-jar-example","status":"publish","type":"page","link":"https:\/\/shirishranjit.com\/blog1\/technical-posts\/maven\/maven-single-jar-example","title":{"rendered":"Maven Single Jar Example"},"content":{"rendered":"<p><code><br \/>\n&lt;build&gt;<br \/>\n&lt;!-- to build one jar the command is: mvn clean compile assembly:single --&gt;<br \/>\n&lt;plugins&gt;<br \/>\n&lt;plugin&gt;<br \/>\n&lt;artifactId&gt;maven-assembly-plugin&lt;\/artifactId&gt;<br \/>\n&lt;configuration&gt;<br \/>\n&lt;archive&gt;<br \/>\n&lt;manifest&gt;<br \/>\n&lt;addClasspath&gt;true&lt;\/addClasspath&gt;&lt;!--\u00a0 this does not seemed to work --&gt;<br \/>\n&lt;mainClass&gt;xx.xx.xx.Main&lt;\/mainClass&gt;<br \/>\n&lt;\/manifest&gt;<br \/>\n&lt;manifestEntries&gt;<br \/>\n&lt;Class-Path&gt;. type&lt;\/Class-Path&gt;<br \/>\n&lt;\/manifestEntries&gt;<br \/>\n&lt;\/archive&gt;<br \/>\n&lt;descriptorRefs&gt;<br \/>\n&lt;descriptorRef&gt;jar-with-dependencies&lt;\/descriptorRef&gt;<br \/>\n&lt;\/descriptorRefs&gt;<br \/>\n&lt;\/configuration&gt;<br \/>\n&lt;executions&gt;<br \/>\n&lt;execution&gt;<br \/>\n&lt;id&gt;make-assembly-nlp&lt;\/id&gt; &lt;!-- this is used for inheritance merges --&gt;<br \/>\n&lt;phase&gt;package&lt;\/phase&gt; &lt;!-- bind to the packaging phase --&gt;<br \/>\n&lt;goals&gt;<br \/>\n&lt;goal&gt;single&lt;\/goal&gt;<br \/>\n&lt;\/goals&gt;<br \/>\n&lt;\/execution&gt;<br \/>\n&lt;\/executions&gt;<br \/>\n&lt;\/plugin&gt;<br \/>\n&lt;\/plugins&gt;<br \/>\n&lt;\/build&gt;<br \/>\n<\/code><\/p>\n<div class=\"twttr_buttons\"><div class=\"twttr_twitter\">\n\t\t\t\t\t<a href=\"http:\/\/twitter.com\/share?text=Maven+Single+Jar+Example\" class=\"twitter-share-button\" data-via=\"\" data-hashtags=\"\"  data-size=\"default\" data-url=\"https:\/\/shirishranjit.com\/blog1\/technical-posts\/maven\/maven-single-jar-example\"  data-related=\"\" target=\"_blank\">Tweet<\/a>\n\t\t\t\t<\/div><div class=\"twttr_followme\">\n\t\t\t\t\t\t<a href=\"https:\/\/twitter.com\/shiranjit\" class=\"twitter-follow-button\" data-size=\"default\"  data-show-screen-name=\"false\"  target=\"_blank\">Follow me<\/a>\n\t\t\t\t\t<\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>&lt;build&gt; &lt;!&#8211; to build one jar the command is: mvn clean compile assembly:single &#8211;&gt; &lt;plugins&gt; &lt;plugin&gt; &lt;artifactId&gt;maven-assembly-plugin&lt;\/artifactId&gt; &lt;configuration&gt; &lt;archive&gt; &lt;manifest&gt; &lt;addClasspath&gt;true&lt;\/addClasspath&gt;&lt;!&#8211;\u00a0 this does not seemed to work &#8211;&gt; &lt;mainClass&gt;xx.xx.xx.Main&lt;\/mainClass&gt; &lt;\/manifest&gt; &lt;manifestEntries&gt; &lt;Class-Path&gt;. type&lt;\/Class-Path&gt; &lt;\/manifestEntries&gt; &lt;\/archive&gt; &lt;descriptorRefs&gt; &lt;descriptorRef&gt;jar-with-dependencies&lt;\/descriptorRef&gt; &lt;\/descriptorRefs&gt; &lt;\/configuration&gt; &lt;executions&gt; &hellip; <a href=\"https:\/\/shirishranjit.com\/blog1\/technical-posts\/maven\/maven-single-jar-example\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":866,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-387","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/shirishranjit.com\/blog1\/wp-json\/wp\/v2\/pages\/387"}],"collection":[{"href":"https:\/\/shirishranjit.com\/blog1\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/shirishranjit.com\/blog1\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/shirishranjit.com\/blog1\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/shirishranjit.com\/blog1\/wp-json\/wp\/v2\/comments?post=387"}],"version-history":[{"count":2,"href":"https:\/\/shirishranjit.com\/blog1\/wp-json\/wp\/v2\/pages\/387\/revisions"}],"predecessor-version":[{"id":868,"href":"https:\/\/shirishranjit.com\/blog1\/wp-json\/wp\/v2\/pages\/387\/revisions\/868"}],"up":[{"embeddable":true,"href":"https:\/\/shirishranjit.com\/blog1\/wp-json\/wp\/v2\/pages\/866"}],"wp:attachment":[{"href":"https:\/\/shirishranjit.com\/blog1\/wp-json\/wp\/v2\/media?parent=387"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}