title: Resolving Maven circular dependencies between test, testhelper, and project-under-test
body: <p>my set up is this. I have project <code>A</code>, and a test project depending on <code>A</code>:</p>
  
  <pre><code>A &lt;- A_t
  </code></pre>
  
  <p>I also have other projects depending on <code>A</code> (and their tests): </p>
  
  <pre><code>A &lt;- B &lt;- B_t
  </code></pre>
  
  <p>To simplify some of the testing I introduce a new library helping test stuff based on <code>A</code>:</p>
  
  <pre><code>A &lt;- Atesthelper
  </code></pre>
  
  <p>So <code>A_t</code> (and <code>B_t</code>) will depend on this test helper, like this:</p>
  
  <pre><code>A &lt;- A_t
  ^    |
  |    v
  Atesthelper
  </code></pre>
  
  <p>However when I create Maven projects (pom.xml) it seems the usual thing is to bundle both the project and the test of that project in the same pom.xml. And I create a new pom.xml for the <code>Atesthelper</code></p>
  
  <p>So now it becomes:</p>
  
  <pre><code>(A &lt;- A_t)
    ^    |
    |    v
  Atesthelper
  </code></pre>
  
  <p>Which is a circular dependency. Is it possible in the pom.xml to somehow specify that <code>Atesthelper</code> is only a dependency of the test build target, and not the <code>A</code> module in itself?</p>
  
  <p>So the build order should be: A, Atesthelper, A_t. I.e. A and A_t which are specified in the same pom, should not be build at the same time.</p>
  
  <p>Thanks in advance.</p>