title: dependencyManagement and scope
body: <p>I usually put a <code>&lt;dependencyManagement&gt;</code> section in <code>parent-project/pom.xml</code>. This <code>&lt;dependencyManagement&gt;</code> section contains declaration and version for all dependencies of my children modules like this (i.e. without the <code>&lt;scope&gt;</code> element):</p>
  
  <pre><code>&lt;dependencyManagement&gt;
    &lt;dependencies&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;junit&lt;/groupId&gt;
        &lt;artifactId&gt;junit&lt;/artifactId&gt;
        &lt;version&gt;4.10&lt;/version&gt;
      &lt;/dependency&gt;
    &lt;/dependencies&gt; 
  &lt;/dependencyManagement&gt;
  </code></pre>
  
  <p>In all children modules (i.e. moduleX/pom.xml), I have: </p>
  
  <pre><code>  &lt;dependencies&gt;
      &lt;dependency&gt;
       &lt;groupId&gt;junit&lt;/groupId&gt;
       &lt;artifactId&gt;junit&lt;/artifactId&gt;
       &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
    &lt;/dependencies&gt; 
  </code></pre>
  
  <p>Obviously, in this example I'm repeating the <code>&lt;scope&gt;test&lt;/scope&gt;</code> multiple times for the same dependency (once in every child module needing junit). </p>
  
  <p>My question is:<br>
  What are the best practices regarding <code>&lt;scope&gt;</code> declaration?<br>
  Is it better to put it in the <code>&lt;dependencyManagement&gt;</code>?<br>
  Or is it better to put it in the <code>&lt;dependencies&gt;</code> section of the child module (like in this post)? And why?<br>
  Is there any definitive answer to this question?  </p>