1

I have a project called 'talktome', with no runtime dependencies.

Also I have project 'talktome-tools', which depends on 'talktome'.

No problems, until I realize that the unit-tests in 'talktome' depends on 'talktome-tools'.

What solutions are there?

Tomerikoo
  • 18,379
  • 16
  • 47
  • 61
doniatio
  • 13
  • 3

2 Answers2

3

If talktome is a general project where other (e.g talktome-tools) depends on, it should not be depend on the more specific projects. Then, it would be wise to get rid of dependency from talktome to talktome-tools.

Otherwise, you would create a more higher level project (e.g parent) and put necessary interfaces, classes that can be used by both talktome and talktome-tools to the new project.

suat
  • 4,239
  • 3
  • 28
  • 51
1

You may move the tests to another maven module like talktome-tests that will do the integration testing. It makes sense especially it seems that talktome shouldn't depend on specific project like talktome-tools.

And, test dependencies like talktome-tools should be included with test scope.

Kasun Gajasinghe
  • 2,735
  • 1
  • 21
  • 30