Maven JAR Plugin: Excluding Package(s) from JAR

Let’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.

Leave a Reply

Your email address will not be published. Required fields are marked *