Search code examples
maven

maven exclude plugin defined in parent pom


I have a parent pom with a few plugins. In my child pom, I want to exclude one plugin.

How can I do this?


Solution

  • You can declare all the plugins in your parent pom within <pluginManagement>. In each child, you can declare the plugins which are used by that child. This way, you can include or exclude plugins as appropriate.

    You can look at this related SO discussion as well.