Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

maven: resolving cyclic dependency

Tags:

cycle

maven

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.

like image 376
D_K Avatar asked Aug 28 '26 11:08

D_K


1 Answers

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.

like image 139
Nicola Musatti Avatar answered Aug 30 '26 08:08

Nicola Musatti



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!