I have two projects which are dependent from each other.
Let's say project maven1 has a class A and project maven2 has a reference to class B. What I basically want is that I can compile and test project maven2 so I added maven1 as dependency to it and set the scope to provided as I don't want to include maven1 (which would be the case if I put the scope to compile e.g. leave it away) In project maven1 I added project maven2 as dependency with scope "compile" as I want it to be included during runtime.
In eclipse I get an error message for that:
A cycle was detected in the build path of project 'maven2'. The cycle consists of projects {maven1, maven2}
Also it seems to cause some issues with eclipse but I generally wanted to ask if my configuration is valid.
Thanks for help!
This is an issue known as cyclic dependency.
To resolve this, you should create a third maven project and refactor common code to the third project (let's name it common).
After this your maven1 and maven2 projects will both have dependency to common.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With