title: How does Maven order modules in the reactor
body: <p>Questions like this haven been asked over and over but somehow they just focus on dependencies. So according to the maven <a href="https://maven.apache.org/guides/mini/guide-multiple-modules.html" rel="noreferrer">documentation</a> the build order is determined as follows.</p>
  
  <blockquote>
    <ul>
    <li>a project dependency on another module in the build</li>
    <li>a plugin declaration where the plugin is another modules in the build</li>
    <li>a plugin dependency on another module in the build</li>
    <li>a build extension declaration on another module in the build</li>
    <li>the order declared in the <code>&lt;modules&gt;</code> element (if no other rule applies)</li>
    </ul>
  </blockquote>
  
  <p>The first rule is quit clear e.g. if module A is dependent on module B the latter is build first.</p>
  
  <p>The fifth rule (last) is quite clear as well. If the former three rules do not apply we look at the order in the module section.</p>
  
  <p>The other two rules are not that clear to me. English is not my native language but I'm wondering if rule two contains a typo of some sort.</p>
  
  <p>I'm looking for a simple example that explains these two rules in some detail.</p>