title: Avoid inheritance of plugins configurations by external modules
body: <p>Suppose I have the three following maven modules :</p>
  <ul>
  <li>parent</li>
  <li>heir (submodule of parent, parent is its parent)</li>
  <li>extern (other project, parent is its parent)</li>
  </ul>
  <p>I would like to configure plugins only for parent and its submodules (parent and heir in my example) without any side effect for external projects (extern in this case).</p>
  <p>parent defines a plugin in pluginManagement, for example :</p>
  <pre><code>&lt;plugin&gt;
      &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
      &lt;artifactId&gt;exec-maven-plugin&lt;/artifactId&gt;
      &lt;version&gt;3.0.0&lt;/version&gt;
      &lt;executions&gt;
          &lt;execution&gt;
              &lt;id&gt;hello, heir&lt;/id&gt;
              &lt;phase&gt;compile&lt;/phase&gt;
              &lt;goals&gt;
                  &lt;goal&gt;exec&lt;/goal&gt;
              &lt;/goals&gt;
              &lt;configuration&gt;
                  &lt;executable&gt;echo&lt;/executable&gt;
                  &lt;arguments&gt;
                      &lt;argument&gt;Hello, heir!&lt;/argument&gt;
                  &lt;/arguments&gt;
              &lt;/configuration&gt;
          &lt;/execution&gt;
      &lt;/executions&gt;
  &lt;/plugin&gt;
  </code></pre>
  <p>Unfortunately, this plugin configuration will have a side effect on extern.
  See, if extern defines the following, the above configuration will apply to him :</p>
  <pre><code>&lt;plugin&gt;
      &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
      &lt;artifactId&gt;exec-maven-plugin&lt;/artifactId&gt;
      &lt;version&gt;3.0.0&lt;/version&gt;
      ...
  &lt;/plugin&gt;
  </code></pre>
  <p>Now, how can change my project structure or pom configuration so that :</p>
  <ol>
  <li>I can build my whole project from a single command on one pom</li>
  <li>I can deploy my whole project from a single command on one pom</li>
  <li>I can define plugins for internal use only (parent pom and its submodules) / An external project will not inherit from these plugins</li>
  <li>Said plugins are still inherited from internal plugins</li>
  </ol>
  <p>?</p>