I am using Maven Assembly plugin to pack a jar file.
But when I run mvn package, maven always trigger the [jar:jar {execution: default-jar}] to create a default jar file.
So I will have 2 jar files (one created by Assembly plugin and one created by Maven jar which i don’t want to be created).
How can I turn off the default-jar execution?
In my pom.xml, I am using: <packaging>jar</packaging>.
I don’t want to change it to <packaging>pom</packaging>.
Looks like you’re doing pretty complicated things. Maybe Maven is not the right tool in your case.
You can set the
<phase>of the corresponding execution to something unknown, likenone:This seems to work as long as you’re providing something else to be installed, like an assembly (I only tested
install). But of course, this is a hack.