Just started using eclipse and I am getting the following error : A cycle was detected in the build path of project . The cycle consists of projects {x,y}.
How can i fix this? I have not done anything different, was trying to add maven dependencies when the error popped up. Have removed the decency but it still shows. Have tried to clean/build in maven, clean and restart my eclipse.
Any suggestions? been spending hours trying to fix this
Procedure. In Eclipse select the web project and right-click Build Path > Configure Build Path. This will display the Java Build Path window. Add the CICS and Liberty libraries, click Add Library > CICS Liberty libraries > Next > Finish.
Make sure that your source folder is listed within "Source folders in build path". If not add it using Add folder button. If problematic file is part of some jar - upon reaching here , click the libraries tab and make sure that the jar file is listed within "Jars and class folders on the build path".
The Java build path is used while compiling a Java project to discover dependent classes . It is made up of the following items − Code in the source folders. Jars and classes folder associated with the project. Classes and libraries exported by projects referenced by this project.
Move code. It's your only option. You need to identify code in x that depends on y or code in y that depends on x. If you can move the code to the other project, that might fix the problem. Otherwise, you may need to move code to a new project. I've had to do both.
You can adjust preferences to handle these dependencies, it would give you a WARNING
Preferences > Java > Compiler > Building > Build path problems > Circular dependencies
This worked for me atleast ! Hope it works for you.
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