title: excluding dependency from common project
body: <p>I have three projects right now that form a dependency chain, <code>Project A</code> depends on <code>Project B</code> depends on <code>Project C</code>.</p>
  
  <p>In <code>Project B</code>, I am attempting to exclude the <code>xml-apis</code> jar that is causing problems with weblogic. I'm doing so like this in <code>Project B</code>'s POM:</p>
  
  <pre><code>&lt;dependency&gt;
      &lt;groupId&gt;com.company&lt;/groupId&gt;
      &lt;artifactId&gt;projectC&lt;/artifactId&gt;
      &lt;version&gt;1.0.3-SNAPSHOT&lt;/version&gt;
      &lt;exclusions&gt;
          &lt;exclusion&gt;
              &lt;artifactId&gt;xml-apis&lt;/artifactId&gt;
              &lt;groupId&gt;xml-apis&lt;/groupId&gt;
          &lt;/exclusion&gt;
      &lt;/exclusions&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p>However, the <code>xml-apis</code> artifact is still being included when I package Project A. What is the correct way to exclude this <code>xml-apis</code> jar? Should I find exactly what package in <code>Project C</code> is bringing this in and mark it as provided there? </p>
  
  <p>Right now my workaround is to just list the above dependency in <code>Project A</code>'s POM.</p>
  
  <p>EDIT:</p>
  
  <p><code>Project A</code> has a dependency on <code>Project B</code> and <code>Project C</code>. Since <code>Project B</code> has a dependency on <code>Project C</code> and <code>Project B</code> would never be used without <code>Project C</code> I was hoping to not have to include the dependency information in <code>Project A</code> and <code>Project B</code>.</p>