Loop in Eclipse

If I open two Java projects in Eclipse that depend on each other, I have to add the dependencies between the two projects in the build path (Properties -> Java build path). This works great for one way, but why doesn't Eclipse let you install dependencies the other way around? The following error message appears:

Project cycle "A" was found in build path

and

Project cycle "B" was found in the build path

I know what is causing this error, but I am wondering why exactly this is not allowed. Thanks.

+2


a source to share


3 answers


This type of circular link cannot be resolved. It takes B to start and B to A to start. But having loops between such projects is bad. If they both depend on each other, then they probably shouldn't be separate projects, as they can't be deployed separately anyway.



+4


a source


Well, if you need to have a loop, you can resolve it by changing from error to warning in Window-> Preferences-> Java-> Compiler-> Building-> Build path problems -> Circular dependencies.



But I still think this is a bad mood.

+13


a source


Changing the preference in Eclipse doesn't help in my case.

The best solution seems to be combining the two projects into one.

0


a source







All Articles