title: Maven: test package cannot be a dependency of other test packages?
body: <p>My project uses maven as the build tool, which works well so far.</p>
  
  <p>I have a test module including all test cases of other modules, which is arranged under test/src/test/java/</p>
  
  <p><a href="https://i.stack.imgur.com/54xSP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/54xSP.png" alt="test module"></a></p>
  
  <p>However, when I create another module (let's call it TestB) and let it depend on the module test, all classes/interfaces defined in module test are invisible to the TestB. I wonder because I put all stuff under test/src/test/java but not test/src/main/java.</p>
  
  <p>But if I move classes to test/src/main/java, the JUnit tool will stop working. Any good ideas on this?</p>