# Cannot include existing Eclipse project

**URL:** https://discuss.gradle.org/t/cannot-include-existing-eclipse-project/12498
**Category:** Buildship
**Created:** [October 28, 2015, 8:04pm UTC](https://discuss.gradle.org/t/cannot-include-existing-eclipse-project/12498 "2015-10-28T20:04:13Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![novasbc](https://avatars.discourse-cdn.com/v4/letter/n/ecb155/32.png) [@novasbc](https://discuss.gradle.org/u/novasbc)
#### Post date: [October 28, 2015, 8:04pm UTC](https://discuss.gradle.org/t/cannot-include-existing-eclipse-project/12498/1 "2015-10-28T20:04:14Z")

</div>

Hi,

Previously, we had two separate places in our Gradle hierarchy with the same name “customactions” (which created an implicit project in Gradle).

I renamed the path of one set of these projects in gradle to be unique, and the problem went away. Howver, recently, developers have noticed the following error, even though we don’t appear to load the same project name twice.  
!ENTRY org.eclipse.buildship.core 4 0 2015-10-28 14:36:19.678  
!MESSAGE Synchronize workspace projects with Gradle counterparts failed due to an error configuring Eclipse.  
!STACK 0  
org.eclipse.buildship.core.GradlePluginsRuntimeException: Cannot include existing Eclipse project customactions.  
at org.eclipse.buildship.core.workspace.internal.DefaultWorkspaceOperations.includeProject(DefaultWorkspaceOperations.java:196)  
at org.eclipse.buildship.core.workspace.internal.DefaultWorkspaceGradleOperations.addExistingEclipseProjectToWorkspace(DefaultWorkspaceGradleOperations.java:205)  
at org.eclipse.buildship.core.workspace.internal.DefaultWorkspaceGradleOperations.synchronizeNonWorkspaceProject(DefaultWorkspaceGradleOperations.java:187)  
at org.eclipse.buildship.core.workspace.internal.DefaultWorkspaceGradleOperations.synchronizeGradleProjectWithWorkspaceProject(DefaultWorkspaceGradleOperations.java:109)  
at org.eclipse.buildship.core.workspace.internal.DefaultWorkspaceGradleOperations.synchronizeGradleBuildWithWorkspace(DefaultWorkspaceGradleOperations.java:70)  
at org.eclipse.buildship.core.workspace.SynchronizeGradleProjectJob.runToolingApiJobInWorkspace(SynchronizeGradleProjectJob.java:71)  
at org.eclipse.buildship.core.util.progress.ToolingApiWorkspaceJob$1.run(ToolingApiWorkspaceJob.java:74)  
at org.eclipse.buildship.core.util.progress.ToolingApiInvoker.invoke(ToolingApiInvoker.java:61)  
at org.eclipse.buildship.core.util.progress.ToolingApiWorkspaceJob.runInWorkspace(ToolingApiWorkspaceJob.java:71)  
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:39)  
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)  
Caused by: java.lang.IllegalStateException: Workspace already contains a project with name customactions.  
at com.google.common.base.Preconditions.checkState(Preconditions.java:150)  
at org.eclipse.buildship.core.workspace.internal.DefaultWorkspaceOperations.includeProject(DefaultWorkspaceOperations.java:176)  
… 10 more

This appears only to happen if I load another Gradle project in the same workspace, yet, the second gradle project doesn’t contain ‘customactions’, so it is odd.

Mark

---

<div class="post-metadata">

### Author: ![donat](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/donat/32/7798_2.png) [@donat](https://discuss.gradle.org/u/donat)
#### Post date: [October 30, 2015, 8:59am UTC](https://discuss.gradle.org/t/cannot-include-existing-eclipse-project/12498/2 "2015-10-30T08:59:56Z")

</div>

We are aware of this, if you want to track the updates on this story you can subscribe to the corresponding [Bugzilla entry](https://bugs.eclipse.org/bugs/show_bug.cgi?id=479609).

Thank you for the report anyway, it’s always nice to get feedback from the users and see their concerns.

---

<div class="post-metadata">

### Author: ![novasbc](https://avatars.discourse-cdn.com/v4/letter/n/ecb155/32.png) [@novasbc](https://discuss.gradle.org/u/novasbc)
#### Post date: [October 30, 2015, 1:44pm UTC](https://discuss.gradle.org/t/cannot-include-existing-eclipse-project/12498/3 "2015-10-30T13:44:12Z")

</div>

I didn’t realize this was related to that ticket. in my case, the ‘customactions’ project only existed in one of the imported projects.

---

<div class="post-metadata">

### Author: ![donat](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/donat/32/7798_2.png) [@donat](https://discuss.gradle.org/u/donat)
#### Post date: [October 30, 2015, 3:03pm UTC](https://discuss.gradle.org/t/cannot-include-existing-eclipse-project/12498/4 "2015-10-30T15:03:31Z")

</div>

Please ignore my previous comment, I understand the problem now. Could you please provide a small sample project what I can use to reproduce the issue?

---

<div class="post-metadata">

### Author: ![novasbc](https://avatars.discourse-cdn.com/v4/letter/n/ecb155/32.png) [@novasbc](https://discuss.gradle.org/u/novasbc)
#### Post date: [October 30, 2015, 3:22pm UTC](https://discuss.gradle.org/t/cannot-include-existing-eclipse-project/12498/5 "2015-10-30T15:22:33Z")

</div>

I will boil it down to the simplest possible example.
