title: Maven seems to be pulling in jars that have test scope
body: <p>I have a war module that is being built and is including a few shrinkwrap jars that it's not supposed to. Namely:</p>
  
  <pre><code>WEB-INF/lib/shrinkwrap-api-1.0.0.jar
  WEB-INF/lib/shrinkwrap-descriptors-api-base-2.0.0-alpha-2.jar
  WEB-INF/lib/shrinkwrap-descriptors-spi-2.0.0-alpha-2.jar
  WEB-INF/lib/shrinkwrap-resolver-api-1.0.0-beta-6.jar
  WEB-INF/lib/shrinkwrap-spi-1.0.0.jar
  </code></pre>
  
  <p>These dependencies are all listed in our poms as test-scoped so they shouldn't be in our packaged war. More info below but my question is: why are these here. There's obviously something I'm missing - what is it/where can I look to find it?</p>
  
  <p>When I show my effective pom, I see the following dependencies (omitting a bunch of stuff here):</p>
  
  <pre><code>&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
  ...
    &lt;dependencyManagement&gt;
      &lt;dependencies&gt;
      ...
        &lt;dependency&gt;
          &lt;groupId&gt;org.jboss.shrinkwrap&lt;/groupId&gt;
          &lt;artifactId&gt;shrinkwrap-extension-descriptors&lt;/artifactId&gt;
          &lt;version&gt;1.0.0-beta-6&lt;/version&gt;
          &lt;scope&gt;test&lt;/scope&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
          &lt;groupId&gt;org.jboss.shrinkwrap&lt;/groupId&gt;
          &lt;artifactId&gt;shrinkwrap-api&lt;/artifactId&gt;
          &lt;version&gt;1.0.0&lt;/version&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
          &lt;groupId&gt;org.jboss.shrinkwrap&lt;/groupId&gt;
          &lt;artifactId&gt;shrinkwrap-spi&lt;/artifactId&gt;
          &lt;version&gt;1.0.0&lt;/version&gt;
          &lt;scope&gt;runtime&lt;/scope&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
          &lt;groupId&gt;org.jboss.shrinkwrap&lt;/groupId&gt;
          &lt;artifactId&gt;shrinkwrap-impl-base&lt;/artifactId&gt;
          &lt;version&gt;1.0.0&lt;/version&gt;
          &lt;scope&gt;runtime&lt;/scope&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
          &lt;groupId&gt;org.jboss.shrinkwrap.resolver&lt;/groupId&gt;
          &lt;artifactId&gt;shrinkwrap-resolver-api&lt;/artifactId&gt;
          &lt;version&gt;1.0.0-beta-6&lt;/version&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
          &lt;groupId&gt;org.jboss.shrinkwrap.resolver&lt;/groupId&gt;
          &lt;artifactId&gt;shrinkwrap-resolver-api-maven&lt;/artifactId&gt;
          &lt;version&gt;1.0.0-beta-6&lt;/version&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
          &lt;groupId&gt;org.jboss.shrinkwrap.resolver&lt;/groupId&gt;
          &lt;artifactId&gt;shrinkwrap-resolver-impl-maven&lt;/artifactId&gt;
          &lt;version&gt;1.0.0-beta-6&lt;/version&gt;
          &lt;scope&gt;runtime&lt;/scope&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
          &lt;groupId&gt;org.jboss.shrinkwrap.descriptors&lt;/groupId&gt;
          &lt;artifactId&gt;shrinkwrap-descriptors-api-base&lt;/artifactId&gt;
          &lt;version&gt;2.0.0-alpha-2&lt;/version&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
          &lt;groupId&gt;org.jboss.shrinkwrap.descriptors&lt;/groupId&gt;
          &lt;artifactId&gt;shrinkwrap-descriptors-api-javaee&lt;/artifactId&gt;
          &lt;version&gt;2.0.0-alpha-2&lt;/version&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
          &lt;groupId&gt;org.jboss.shrinkwrap.descriptors&lt;/groupId&gt;
          &lt;artifactId&gt;shrinkwrap-descriptors-api-jboss&lt;/artifactId&gt;
          &lt;version&gt;2.0.0-alpha-2&lt;/version&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
          &lt;groupId&gt;org.jboss.shrinkwrap.descriptors&lt;/groupId&gt;
          &lt;artifactId&gt;shrinkwrap-descriptors-gen&lt;/artifactId&gt;
          &lt;version&gt;2.0.0-alpha-2&lt;/version&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
          &lt;groupId&gt;org.jboss.shrinkwrap.descriptors&lt;/groupId&gt;
          &lt;artifactId&gt;shrinkwrap-descriptors-impl-base&lt;/artifactId&gt;
          &lt;version&gt;2.0.0-alpha-2&lt;/version&gt;
          &lt;scope&gt;runtime&lt;/scope&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
          &lt;groupId&gt;org.jboss.shrinkwrap.descriptors&lt;/groupId&gt;
          &lt;artifactId&gt;shrinkwrap-descriptors-impl-javaee&lt;/artifactId&gt;
          &lt;version&gt;2.0.0-alpha-2&lt;/version&gt;
          &lt;scope&gt;runtime&lt;/scope&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
          &lt;groupId&gt;org.jboss.shrinkwrap.descriptors&lt;/groupId&gt;
          &lt;artifactId&gt;shrinkwrap-descriptors-impl-jboss&lt;/artifactId&gt;
          &lt;version&gt;2.0.0-alpha-2&lt;/version&gt;
          &lt;scope&gt;runtime&lt;/scope&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
          &lt;groupId&gt;org.jboss.shrinkwrap.descriptors&lt;/groupId&gt;
          &lt;artifactId&gt;shrinkwrap-descriptors-spi&lt;/artifactId&gt;
          &lt;version&gt;2.0.0-alpha-2&lt;/version&gt;
          &lt;scope&gt;runtime&lt;/scope&gt;
        &lt;/dependency&gt;
      &lt;/dependencies&gt;
    &lt;/dependencyManagement&gt;
    &lt;dependencies&gt;
      ...
      &lt;dependency&gt;
        &lt;groupId&gt;org.jboss.shrinkwrap.resolver&lt;/groupId&gt;
        &lt;artifactId&gt;shrinkwrap-resolver-api-maven&lt;/artifactId&gt;
        &lt;version&gt;1.0.0-beta-6&lt;/version&gt;
        &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;org.jboss.shrinkwrap.resolver&lt;/groupId&gt;
        &lt;artifactId&gt;shrinkwrap-resolver-impl-maven&lt;/artifactId&gt;
        &lt;version&gt;1.0.0-beta-6&lt;/version&gt;
        &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;org.jboss.shrinkwrap&lt;/groupId&gt;
        &lt;artifactId&gt;shrinkwrap-impl-base&lt;/artifactId&gt;
        &lt;version&gt;1.0.0&lt;/version&gt;
        &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
    &lt;/dependencies&gt;
    ...
  &lt;/project&gt;
  </code></pre>
  
  <p>When I print the dependency tree, I get the output below (only showing nodes that have the jars in question in them. I do see that some of these jars are listed as "runtime" and "runtime (scope managed from test)" but I'm not sure if that is related or how they got switched/included as runtime since in most of the cases, the dependency those belong to are test-scope:</p>
  
  <pre><code>[INFO] --- maven-dependency-plugin:2.1:tree (default-cli) @ name_removed ---
  ...
  [INFO] +- org.jboss.arquillian.extension:arquillian-seam2:jar:1.0.0.Alpha2:test
  [INFO] |  \- org.jboss.shrinkwrap:shrinkwrap-extension-descriptors:jar:1.0.0-beta-6:test (version managed from 1.0.0-beta-5)
  [INFO] +- org.jboss.arquillian.protocol:arquillian-protocol-servlet:jar:1.0.0.Final:test
  [INFO] |  +- org.jboss.arquillian.container:arquillian-container-spi:jar:1.0.0.Final:test
  [INFO] |  |  +- org.jboss.arquillian.config:arquillian-config-api:jar:1.0.0.Final:test
  [INFO] |  |  \- org.jboss.arquillian.config:arquillian-config-impl-base:jar:1.0.0.Final:test
  [INFO] |  +- org.jboss.arquillian.container:arquillian-container-test-api:jar:1.0.0.Final:test
  [INFO] |  \- org.jboss.shrinkwrap.descriptors:shrinkwrap-descriptors-spi:jar:2.0.0-alpha-2:runtime
  [INFO] |     \- org.jboss.shrinkwrap.descriptors:shrinkwrap-descriptors-api-base:jar:2.0.0-alpha-2:runtime (version managed from 1.2.0-alpha-1)
  
  [INFO] +- org.jboss.shrinkwrap.resolver:shrinkwrap-resolver-api-maven:jar:1.0.0-beta-6:test (scope not updated to runtime)
  [INFO] +- org.jboss.shrinkwrap.resolver:shrinkwrap-resolver-impl-maven:jar:1.0.0-beta-6:test (scope not updated to runtime)
  [INFO] |  +- org.jboss.shrinkwrap.resolver:shrinkwrap-resolver-api:jar:1.0.0-beta-6:test
  [INFO] |  +- org.sonatype.aether:aether-api:jar:1.8:test
  [INFO] |  +- org.sonatype.aether:aether-util:jar:1.8:test
  [INFO] |  +- org.sonatype.aether:aether-connector-wagon:jar:1.8:test
  [INFO] |  |  +- org.sonatype.aether:aether-spi:jar:1.8:test
  [INFO] |  |  \- org.codehaus.plexus:plexus-container-default:jar:1.5.5:test
  [INFO] |  |     +- org.codehaus.plexus:plexus-classworlds:jar:2.2.2:test
  [INFO] |  |     +- org.apache.xbean:xbean-reflect:jar:3.4:test
  [INFO] |  |     |  \- commons-logging:commons-logging-api:jar:1.1:test
  [INFO] |  |     \- com.google.collections:google-collections:jar:1.0:test
  [INFO] |  +- org.apache.maven:maven-aether-provider:jar:3.0.1:test
  [INFO] |  |  +- org.apache.maven:maven-model:jar:3.0.1:test
  [INFO] |  |  +- org.apache.maven:maven-model-builder:jar:3.0.1:test
  [INFO] |  |  +- org.apache.maven:maven-repository-metadata:jar:3.0.1:test
  [INFO] |  |  +- org.sonatype.aether:aether-impl:jar:1.8:test
  [INFO] |  |  +- org.codehaus.plexus:plexus-component-annotations:jar:1.5.5:test
  [INFO] |  |  \- org.codehaus.plexus:plexus-utils:jar:2.0.4:test
  [INFO] |  +- org.apache.maven:maven-settings-builder:jar:3.0.1:test
  [INFO] |  |  +- org.codehaus.plexus:plexus-interpolation:jar:1.14:test
  [INFO] |  |  +- org.apache.maven:maven-settings:jar:3.0.1:test
  [INFO] |  |  \- org.sonatype.plexus:plexus-sec-dispatcher:jar:1.3:test
  [INFO] |  |     \- org.sonatype.plexus:plexus-cipher:jar:1.4:test
  [INFO] |  +- org.apache.maven.wagon:wagon-provider-api:jar:1.0-beta-7:test
  [INFO] |  +- org.apache.maven.wagon:wagon-file:jar:1.0-beta-7:test
  [INFO] |  \- org.apache.maven.wagon:wagon-http-lightweight:jar:1.0-beta-7:test
  [INFO] |     \- org.apache.maven.wagon:wagon-http-shared:jar:1.0-beta-7:test
  [INFO] \- org.jboss.shrinkwrap:shrinkwrap-impl-base:jar:1.0.0:test (scope not updated to runtime)
  [INFO]    \- org.jboss.shrinkwrap:shrinkwrap-spi:jar:1.0.0:runtime (scope managed from test)
  [INFO]       \- org.jboss.shrinkwrap:shrinkwrap-api:jar:1.0.0:runtime
  </code></pre>