title: Getting the "provided" dependencies in SBT
body: <p>I'm trying to make use of the <code>provided</code> configuration in SBT, but I'm having trouble figuring out how to get the full <code>provided</code> dependency classpath.</p>
  
  <p>For simplicity, let's say I have two projects, <strong>A</strong> and <strong>B</strong> :</p>
  
  <ul>
  <li><strong>A</strong> has a few (JAR) dependencies, and exports compiled class files to <code>path/to/A/target</code></li>
  <li><strong>B</strong> depends on <strong>A</strong> in the <code>provided</code> scope (
  <code>Project("B") dependsOn(A % "provided")</code>) and exports compiled class files to <code>path/to/B/target</code></li>
  </ul>
  
  <p>In <strong>B</strong>, this returns the provided JARs, but not the provided internal dependencies :</p>
  
  <pre><code>providedDependencies &lt;&lt;= (update) map (_.select(Set("provided")))
  </code></pre>
  
  <p>This returns the internal dependencies (<code>path/to/A/target</code>) for every configuration, but not specifically for the <code>provided</code> scope, and does not output the JAR dependencies :</p>
  
  <pre><code>providedDependencies &lt;&lt;= (internalDependencyClasspath) map (_.files)
  </code></pre>
  
  <p>However, the <strong>A</strong> module shows up in the <code>provided</code> scope when using <code>show update</code> in the <strong>B</strong> project.</p>
  
  <p>Any idea?</p>