SnowyCoder
SnowyCoder

Reputation: 213

Maven subclasses shared test

I created with maven a module P that has 3 submodules: A, B, C. B and C implement A but they have nothing to do with each other. I have to test the interaction between classes from B and from C (something like server-client connection). Is there a way (that doesn't need the creation of a fourth module) to do this?

Upvotes: 0

Views: 50

Answers (1)

If you want to be able to test interactions between the two projects but you don't have any other dependencies between them, you can make one (C) depend on the other (B) and use the Maven test scope. This will make the classes from B available for your test code, but there won't be any relationship or dependency in the packaged artifacts or anything that depends on them.

Upvotes: 1

Related Questions