my maven project has multiple maven modules. Two of those modules (product and feature) are dependent on each other. When I include the modules as dependencies in the pom files,
It may not work for your particular situation but another option to rectify cyclical dependencies is to use events.
First, set your modules up in a tree with no cyclical dependencies. Put your Event classes at the top of the tree. Then publish and listen for events in any of the modules. This allows you to have modules that communicate with each other without depending on each other.
For how to publish and listen for events in Spring see:
https://spring.io/blog/2015/02/11/better-application-events-in-spring-framework-4-2
Design smell.
Refactor your modules. Basically everything which is needed in both modules should go into a common dependency. You cannot have cycles in your dependency tree, it just won't work.