mardi 14 mars 2017

Maven sub modules depending on each other

Currently I have a single module which has both integration tests and unit tests. I'm trying to split this into 2 projects, so unit tests remain in the main code base, and a separate module for the integration tests.

Therefore, I have created a new sub module (module B), which depends on the first sub module (module A) so the integration tests have access to the src code.

The problem I have is that both the unit tests and the integration tests use some util assertion classes (e.g. custom hamcrest assertions). These util assertions should not live in the src code of module A, but I dont believe they should be in module A test directory either.

Therefore it is pointing to another project for all these custom assertions. This is then very messy... Does anyone know of a way round this?

My thoughts were to have module B to have the src directory containing all the custom assertion classes which can be imported as a dependency into module A (but this causes a cyclic dependency error).

Aucun commentaire:

Enregistrer un commentaire