title: Maven: use specific test-classes of project A in project B
body: <p>I have projects A and B where B requires A. Inside project A I have a utility-class UC that should only be available for JUnit-tests and, therefore, resides in <code>src/test/java</code> of project A. As long as I write tests in A I have access to UC. However, if I run Maven and want it to execute the tests in B, I get compiler errors since UC is not accessible in B.</p>
  
  <p>Obviously Eclipse includes all classes in all source folders when it compiles something (i.e., it knows about UC when I write tests in B), while Maven removes all test-classes in the final version of A.</p>
  
  <p>My question is this: what do I need to do to have UC accessible in B when I run its tests with Maven?</p>
  
  <p>Please understand that I'm new to Maven and I think that similar questions have been asked. However, I can't convert what is written there into my problem and fix it.</p>
  
  <p><em>I hope it's clear what I'm trying to do...</em></p>