0

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?

4
  • Make B a test-scope dependency of C? Commented Apr 3, 2017 at 16:43
  • I want B and C to be distributed separately Commented Apr 3, 2017 at 16:50
  • Read up on Maven scopes. Commented Apr 3, 2017 at 16:55
  • Thank you, I forgot that it existed, can you write it as an answer so I can accept it? Commented Apr 3, 2017 at 17:02

1 Answer 1

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.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.