I have a project A that contains the data model code (Hibernate) and some unit tests. I also have other projects B, C and D with their code and unit tests. I also have a set of test utilities classes used by the unit tests of all the projects. These test utilities classes depend on project A because they use the data model classes.
If I put these test utilities classes in the project A, I get the following problem: how projects B, C and D may view these test utilities classes outside the IDE (I precise that these test utilities classes are placed in the src/test/java directory and then are not included in the JAR)?
If I put these test utilities classes in a separated project, I get a circular dependency because the test utilities classes depend on project A and the unit tests of A use these test utilities classes.
Thanks for your help
These test utilities classes should be packaged (by your build process) in a separate JAR file that the other projects use only when running tests.