Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

A cycle was detected in the build path of project ... eclipse

Tags:

java

eclipse

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

like image 480
user648244 Avatar asked May 08 '14 16:05

user648244


People also ask

How do I fix eclipse build path?

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.

How do you fix a build path problem?

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".

What is Eclipse 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.


2 Answers

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.

like image 126
user3294068 Avatar answered Oct 22 '22 13:10

user3294068


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.

like image 44
rdj7 Avatar answered Oct 22 '22 13:10

rdj7