3

My java root project has source code and maven modules it depends on. One of these modules A has a cyclic dependency with the root project. What would be a recommended way to get rid of this cyclic dependency?

UPD: I have solved it already before posting a question, but decided to share.

Alexander Pogrebnyak
  • 44,836
  • 10
  • 105
  • 121
D_K
  • 1,410
  • 12
  • 35
  • anwser: To resolve it, the best way is to extract the code module A depends on from the topmost project to its own maven module. – D_K Sep 01 '11 at 13:16

1 Answers1

3

Your root project should have POM packaging and shouldn't contain any code. Move any such code to a new project and configure dependencies to/from this project.

Nicola Musatti
  • 17,834
  • 2
  • 46
  • 55
  • that's right! Eventually it should happen, now I have just started "modularizing" the project, which is being updated by other developers. So I take one step at a time. – D_K Sep 02 '11 at 10:38