Search code examples
mavenmaven-assembly-plugin

How to exclude all pom.xml from dependencies included by assembly plugin?


Maven's assembly plugin enables the creation of a big jar including all dependencies with descriptorRef jar-with-dependencies.

How can i exclude all pom.xml files of the included dependencies?


Solution

  • You have to to your project and change the configuration of the maven-jar-plugin which is configured by default to add the pom.xml file to the generated jar...The archive configuration for the maven-jar-plugin would be the right choice. Best is to create an pluginManagement section and do the configuration for maven-jar-plugin. But i don't understand why this is a big issue.