title: Difference in transitive dependencies after Maven upgrade 2.2.1 to 3.2.5
body: <p>My company's infrastructure changed which forced upgrade from Maven 2.2.1 to maven 3.0.5</p>
  
  <p>Structure of my project is one EAR containing a few modules. EAR's dependencies are stored in it's <code>lib</code> folder which is on the classpath, and all of the modules can use it. When we have a dependency that is used by more than module it's added as an EAR's dependency in scope <code>compile</code> and in scope <code>provided</code> for modules that need it - this way files are not doubled.</p>
  
  <p>After upgrade dependencies with scope <code>provided</code> are treated differently. Their transitive dependencies are added to their module's lib folder. This causes conflicts.</p>
  
  <p>I've found a proposed solution after some research - configure maven-dependency-plugin to <code>&lt;excludeScope&gt;provided&lt;/excludeScope&gt;</code> during <code>&lt;goal&gt;copy-dependencies&lt;/goal&gt;</code>, but it changes nothing - transient dependencies are added to modules' <code>lib</code> folder anyway.</p>
  
  <p>Do I understand the problem wrong? What changed between maven 2 and 3 that causes this?</p>
  
  <p>Regards,
  Jan</p>
  
  <p>Plugin configuration in troublesome module:</p>
  
  <pre><code>    &lt;plugin&gt;
          &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
          &lt;artifactId&gt;maven-dependency-plugin&lt;/artifactId&gt;
          &lt;executions&gt;
              &lt;execution&gt;
                  &lt;id&gt;copy-dependencies&lt;/id&gt;
                  &lt;goals&gt;
                      &lt;goal&gt;copy-dependencies&lt;/goal&gt;
                  &lt;/goals&gt;
                  &lt;configuration&gt;
                      &lt;excludeScope&gt;provided&lt;/excludeScope&gt;
                  &lt;/configuration&gt;
              &lt;/execution&gt;
          &lt;/executions&gt;
      &lt;/plugin&gt;
  </code></pre>