[GRADLE-2200] Cycle detected when setting up gradle's own source in eclipse Created: 28/Mar/12  Updated: 10/Feb/17  Resolved: 10/Feb/17

Status: Resolved
Project: Gradle
Affects Version/s: None
Fix Version/s: None

Type: Bug
Reporter: Gradle Forums Assignee: Unassigned
Resolution: Won't Fix Votes: 0


I did a 'git pull' on the gradle source, ran './gradlew cleanEclipse eclipse' and then imported all the items in subprojects into eclipse. Eclipse hangs for a long time in "refreshing workspace", but eventually finishes with many errors like this one. Is the a problem with viewing/editing gradle's source code in eclipse, or a problem with the eclipse plugin?

Description Resource Path Location Type
A cycle was detected in the build path of project 'core'. The cycle consists of projects

{core, native, announce, internalTesting, baseServices, coreImpl, internalIntegTesting, launcher, ui, openApi, toolingApi, wrapper, ide, scala, plugins, ear, antlr, codeQuality, cpp, maven, integTest, jetty, osgi, sonar, signing, performance}

core Build path Build Path Problem

./gradlew --version

Gradle 1.0-milestone-9

Gradle build time: Tuesday, March 13, 2012 4:10:09 PM UTC
Groovy: 1.8.6
Ant: Apache Ant(TM) version 1.8.2 compiled on December 20 2010
Ivy: 2.2.0
JVM: 1.6.0_29 (Apple Inc. 20.4-b02-402)
OS: Mac OS X 10.7.3 x86_64

Comment by Gradle Forums [ 28/Mar/12 ]

It's a problem with mapping Gradle's view of the world to Eclipse's view of the world. Dependencies are much more coarse grained in Eclipse than in Gradle,which is why you can have cycles in Eclipse when there are none in Gradle. One potential solution is to map the multi-project Gradle build to a single Eclipse project, but the Gradle Eclipse plugin isn't currently flexible enough to do this.

We hope to fix this some day. Until then, the IDE of choice for working on the Gradle project is IntelliJ IDEA (which is what Gradle committers use).

Comment by Szczepan Faber [ 23/May/12 ]

In order to resolve the problem you can configure eclipse to treat project dependency cycles as 'warnings'. You can do it in Eclipse via: Window > Preferences > Java > Compiler > Building > Build path problems > Circular dependencies = Warning.

Comment by Benjamin Muschko [ 15/Nov/16 ]

As announced on the Gradle blog we are planning to completely migrate issues from JIRA to GitHub.

We intend to prioritize issues that are actionable and impactful while working more closely with the community. Many of our JIRA issues are inactionable or irrelevant. We would like to request your help to ensure we can appropriately prioritize JIRA issues you’ve contributed to.

Please confirm that you still advocate for your JIRA issue before December 10th, 2016 by:

  • Checking that your issues contain requisite context, impact, behaviors, and examples as described in our published guidelines.
  • Leave a comment on the JIRA issue or open a new GitHub issue confirming that the above is complete.

We look forward to collaborating with you more closely on GitHub. Thank you for your contribution to Gradle!

Comment by Benjamin Muschko [ 10/Feb/17 ]

Thanks again for reporting this issue. We haven't heard back from you after our inquiry from November 15th. We are closing this issue now. Please create an issue on GitHub if you still feel passionate about getting it resolved.

Generated at Wed Jun 30 12:15:26 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.