0

I have a multi-module maven project. one of the modules (module-A) let me create an executable jar. This jar is normally executed from a third party application and communicate via stdin/stdout.

a second one (module-B) is an integration test. In this module I want to verify that the third party process can communicate succesfully and my jar can behave in the expected way.

at the moment, if I do some changes to module-A source code, I need to firstly mvn package the module to get the new jar and then I can run the tests in module-B.

what is the best way to tell module-B to firstly package module-A before running the tests?

Vito De Tullio
  • 2,332
  • 3
  • 33
  • 52
  • One option could be to create a script that wolud first build Module A and then execute integration tests in Module B. – Kaspars Rinkevics Jun 15 '23 at 15:37
  • First you have to define the dependencies correctly ... then maven will automatically package module-A before running module-B ... Why are the integration tests in module-B instead of A? Can you give more detailed information on that ... And what kind of functionally needs really to execute the jar ? Are usual unit- integration tests are not enough? – khmarbaise Jun 15 '23 at 16:16
  • ok, then how can I express the dependencies correctly? again: if I build module-A I get and executable jar. In module-B I want to *use* the executable jar in my tests. Moreover I want to be able to update the source code of module-A, run the tests in module-B and then mvn should automatically rebuild the executable jar. – Vito De Tullio Jun 16 '23 at 07:50

0 Answers0