Sharing src/test classes between modules in a multi-module maven project

前端 未结 2 1378
醉酒成梦
醉酒成梦 2020-12-02 07:34

I have a multi-module Maven project. For the sake of this example, consider two modules:

  • data
  • consumer

Modul

2条回答
  •  清歌不尽
    2020-12-02 07:55

    So the problem is that (some) tests in the data module depend on the SampleDataHelper class? You can move the SampleDataHelper class to src/main of the data-test module, if you at the same time move the tests (that depend on the specific class) to the src/test of the data-test module. Consequently, there would be no more circular dependencies.

提交回复
热议问题