{"id":504,"date":"2012-12-04T13:14:43","date_gmt":"2012-12-04T20:14:43","guid":{"rendered":"http:\/\/10kdev.ivystreetinc.com\/?p=504"},"modified":"2012-12-17T15:32:21","modified_gmt":"2012-12-17T22:32:21","slug":"dont-build-the-maven-jar","status":"publish","type":"post","link":"http:\/\/10kdev.net\/?p=504","title":{"rendered":"Don&#8217;t Build the Maven Jar"},"content":{"rendered":"<p>I&#8217;m using the maven-assembly-plugin to build a zip for some static content in a maven module.  But when I build the whole project I also end up getting a jar file for that module.  To avoid this use one of two tricks &#8211; \u00a0either\u00a0specify\u00a0your build as a type &#8220;pom&#8221; or \u00a0tell the jar plugin to do nothing at all.<\/p>\n<p>1. \u00a0POM type packaging<\/p>\n<pre style=\"padding-left: 30px;\">&lt;groupId&gt;\"group ID\"&lt;\/groupId&gt;<\/pre>\n<pre style=\"padding-left: 30px;\">&lt;artifactId&gt;\"artifact ID\"&lt;\/artifactId&gt;<\/pre>\n<pre style=\"padding-left: 30px;\">&lt;version&gt;1.0&lt;\/version&gt;<\/pre>\n<pre style=\"padding-left: 30px;\">&lt;packaging&gt;pom&lt;\/packaging&gt;<\/pre>\n<p>2. \u00a0&#8220;Nulling&#8221; the jar plugin<\/p>\n<pre style=\"padding-left: 30px;\">&lt;plugin&gt;<\/pre>\n<pre style=\"padding-left: 60px;\">&lt;artifactId&gt;maven-jar-plugin&lt;\/artifactId&gt;<\/pre>\n<pre style=\"padding-left: 60px;\">&lt;executions&gt;<\/pre>\n<pre style=\"padding-left: 90px;\">&lt;execution&gt;<\/pre>\n<pre style=\"padding-left: 120px;\">&lt;id&gt;default-jar&lt;\/id&gt;<\/pre>\n<pre style=\"padding-left: 120px;\">&lt;phase&gt;none&lt;\/phase&gt;<\/pre>\n<pre style=\"padding-left: 120px;\">&lt;configuration&gt;<\/pre>\n<pre style=\"padding-left: 150px;\">&lt;finalName&gt;nothing&lt;\/finalName&gt;<\/pre>\n<pre style=\"padding-left: 150px;\">&lt;classifier&gt;nothing&lt;\/classifier&gt;<\/pre>\n<pre style=\"padding-left: 120px;\">&lt;\/configuration&gt;<\/pre>\n<pre style=\"padding-left: 90px;\">&lt;\/execution&gt;<\/pre>\n<pre style=\"padding-left: 60px;\">&lt;\/executions&gt;<\/pre>\n<pre style=\"padding-left: 30px;\">&lt;\/plugin&gt;<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m using the maven-assembly-plugin to build a zip for some static content in a maven module. But when I build the whole project I also end up getting a jar file for that module. To avoid this use one of two tricks &#8211; \u00a0either\u00a0specify\u00a0your build as a type &#8220;pom&#8221; or \u00a0tell the jar plugin to [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"http:\/\/10kdev.net\/index.php?rest_route=\/wp\/v2\/posts\/504"}],"collection":[{"href":"http:\/\/10kdev.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/10kdev.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/10kdev.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/10kdev.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=504"}],"version-history":[{"count":15,"href":"http:\/\/10kdev.net\/index.php?rest_route=\/wp\/v2\/posts\/504\/revisions"}],"predecessor-version":[{"id":533,"href":"http:\/\/10kdev.net\/index.php?rest_route=\/wp\/v2\/posts\/504\/revisions\/533"}],"wp:attachment":[{"href":"http:\/\/10kdev.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=504"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/10kdev.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=504"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/10kdev.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=504"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}