<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Maven JAR Plugin &#8211; My Shitty Code</title>
	<atom:link href="https://myshittycode.com/tag/maven-jar-plugin/feed/" rel="self" type="application/rss+xml" />
	<link>https://myshittycode.com</link>
	<description>Embracing the Messiness in Search of Epic Solutions</description>
	<lastBuildDate>Fri, 06 Jan 2023 17:01:32 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.1</generator>

<image>
	<url>https://myshittycode.com/wp-content/uploads/2022/04/cropped-icon-32x32.png</url>
	<title>Maven JAR Plugin &#8211; My Shitty Code</title>
	<link>https://myshittycode.com</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">205304208</site>	<item>
		<title>Maven JAR Plugin: Excluding Package(s) from JAR</title>
		<link>https://myshittycode.com/2014/04/14/maven-jar-plugin-excluding-packages-from-jar/</link>
					<comments>https://myshittycode.com/2014/04/14/maven-jar-plugin-excluding-packages-from-jar/#respond</comments>
		
		<dc:creator><![CDATA[Shitty Author]]></dc:creator>
		<pubDate>Mon, 14 Apr 2014 13:14:49 +0000</pubDate>
				<category><![CDATA[Programming Language]]></category>
		<category><![CDATA[Maven]]></category>
		<category><![CDATA[Maven JAR Plugin]]></category>
		<guid isPermaLink="false">http://myshittycode.com/?p=490</guid>

					<description><![CDATA[<p>Let&#8217;s assume we want to exclude com.choonchernlim.epicapp.scratch package when we create the JAR file. Add the following in pom.xml:- The key here is to specify the execution ID called default-jar.</p>
<p>The post <a rel="nofollow" href="https://myshittycode.com/2014/04/14/maven-jar-plugin-excluding-packages-from-jar/">Maven JAR Plugin: Excluding Package(s) from JAR</a> appeared first on <a rel="nofollow" href="https://myshittycode.com">My Shitty Code</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Let&#8217;s assume we want to exclude <code>com.choonchernlim.epicapp.scratch</code> package when we create the JAR file.</p>



<p>Add the following in <code>pom.xml</code>:-</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: xml; highlight: [7]; title: ; notranslate">
&lt;plugin&gt;
    &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
    &lt;artifactId&gt;maven-jar-plugin&lt;/artifactId&gt;
    &lt;version&gt;2.4&lt;/version&gt;
    &lt;executions&gt;
        &lt;execution&gt;
            &lt;id&gt;default-jar&lt;/id&gt;
            &lt;phase&gt;package&lt;/phase&gt;
            &lt;goals&gt;
                &lt;goal&gt;jar&lt;/goal&gt;
            &lt;/goals&gt;
            &lt;configuration&gt;
                &lt;excludes&gt;
                    &lt;exclude&gt;**/scratch/**&lt;/exclude&gt;
                &lt;/excludes&gt;
            &lt;/configuration&gt;
        &lt;/execution&gt;
    &lt;/executions&gt;
&lt;/plugin&gt;
</pre></div>


<p>The key here is to specify the execution ID called <code>default-jar</code>.</p>
<p>The post <a rel="nofollow" href="https://myshittycode.com/2014/04/14/maven-jar-plugin-excluding-packages-from-jar/">Maven JAR Plugin: Excluding Package(s) from JAR</a> appeared first on <a rel="nofollow" href="https://myshittycode.com">My Shitty Code</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://myshittycode.com/2014/04/14/maven-jar-plugin-excluding-packages-from-jar/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">490</post-id>	</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/?utm_source=w3tc&utm_medium=footer_comment&utm_campaign=free_plugin

Page Caching using Disk: Enhanced 
Lazy Loading (feed)
Database Caching 52/67 queries in 0.034 seconds using Disk

Served from: myshittycode.com @ 2026-03-03 07:03:03 by W3 Total Cache
-->