0

I have a project where all features are in module manner. So in that I have 2 modules, one is core and another one is imageprocess. So Imageprocess added core as a dependency. Now I want to use Imageprocesser module class in core module. When I added this Imageprocess as a dependency my build got failed and getting cyclic error.

How can I fix this?

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
  • 2
    Does this answer your question? [Maven cyclic dependency](https://stackoverflow.com/questions/44818497/maven-cyclic-dependency) – nmkyuppie Jul 17 '20 at 12:12

1 Answers1

0

You can only have dependencies in one direction.

Either imageprocess depends on core or the other way round. Not both.

If there are classes you need in both modules, you need to move them or introduce a third module (maybe base) that is used as dependency in both imageprocess and core.

J Fabian Meier
  • 33,516
  • 10
  • 64
  • 142