title: Maven import scope not importing test dependencies
body: <p>I'd like to define a large number of both <code>compile</code> and <code>test</code> dependencies in a POM to be imported in to other POMs. Everything works as expected for the <code>compile</code> dependencies. But the <code>test</code> dependencies are not resolved in my project's POM. </p>
  
  <p>Her's a minimalist example:</p>
  
  <p><strong>POM to be imported:</strong></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/maven-v4_0_0.xsd"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
      &lt;groupId&gt;com.example.maven.import&lt;/groupId&gt;
      &lt;artifactId&gt;pom-to-be-imported&lt;/artifactId&gt;
      &lt;packaging&gt;pom&lt;/packaging&gt;
      &lt;version&gt;1&lt;/version&gt;
  
      &lt;dependencyManagement&gt;
          &lt;dependencies&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;org.apache.commons&lt;/groupId&gt;
                  &lt;artifactId&gt;commons-lang3&lt;/artifactId&gt;
                  &lt;version&gt;3.8&lt;/version&gt;
              &lt;/dependency&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;org.junit.jupiter&lt;/groupId&gt;
                  &lt;artifactId&gt;junit-jupiter-api&lt;/artifactId&gt;
                  &lt;version&gt;5.3.1&lt;/version&gt;
                  &lt;scope&gt;test&lt;/scope&gt;
              &lt;/dependency&gt;
          &lt;/dependencies&gt;
      &lt;/dependencyManagement&gt;
  
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.commons&lt;/groupId&gt;
              &lt;artifactId&gt;commons-lang3&lt;/artifactId&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.junit.jupiter&lt;/groupId&gt;
              &lt;artifactId&gt;junit-jupiter-api&lt;/artifactId&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  
  &lt;/project&gt;
  </code></pre>
  
  <p><strong>POM using the import:</strong></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/maven-v4_0_0.xsd"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
      &lt;groupId&gt;com.example.maven.import&lt;/groupId&gt;
      &lt;artifactId&gt;pom-using-import&lt;/artifactId&gt;
      &lt;packaging&gt;pom&lt;/packaging&gt;
      &lt;version&gt;1&lt;/version&gt;
  
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.example.maven.import&lt;/groupId&gt;
              &lt;artifactId&gt;pom-to-be-imported&lt;/artifactId&gt;
              &lt;version&gt;1&lt;/version&gt;
              &lt;type&gt;pom&lt;/type&gt;
              &lt;scope&gt;import&lt;/scope&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  
  &lt;/project&gt;
  </code></pre>
  
  <p>When I run a <code>dependency:tree</code>, it only shows the <code>compile</code> dependencies of <code>commons-lang3</code>, but not the JUnit <code>test</code> dependency:</p>
  
  <pre><code>&gt;mvn dependency:tree
  . . .
  [INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ pom-using-import ---
  [INFO] com.example.maven.import:pom-using-import:pom:1
  [INFO] \- com.example.maven.import:pom-to-be-imported:pom:1:import
  [INFO]    \- org.apache.commons:commons-lang3:jar:3.8:runtime
  [INFO] ------------------------------------------------------------------------
  </code></pre>
  
  <p><strong><em>How can I get the <code>test</code> dependencies to be imported as well?</em></strong> I did not find anything in the <a href="https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html" rel="nofollow noreferrer">maven documentation</a> indicating that import only works for <code>compile</code> dependencies. </p>