Cannot include existing Eclipse project


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.
org.eclipse.buildship.core.GradlePluginsRuntimeException: Cannot include existing Eclipse project customactions.
at org.eclipse.buildship.core.workspace.internal.DefaultWorkspaceOperations.includeProject(
at org.eclipse.buildship.core.workspace.internal.DefaultWorkspaceGradleOperations.addExistingEclipseProjectToWorkspace(
at org.eclipse.buildship.core.workspace.internal.DefaultWorkspaceGradleOperations.synchronizeNonWorkspaceProject(
at org.eclipse.buildship.core.workspace.internal.DefaultWorkspaceGradleOperations.synchronizeGradleProjectWithWorkspaceProject(
at org.eclipse.buildship.core.workspace.internal.DefaultWorkspaceGradleOperations.synchronizeGradleBuildWithWorkspace(
at org.eclipse.buildship.core.workspace.SynchronizeGradleProjectJob.runToolingApiJobInWorkspace(
at org.eclipse.buildship.core.util.progress.ToolingApiWorkspaceJob$
at org.eclipse.buildship.core.util.progress.ToolingApiInvoker.invoke(
at org.eclipse.buildship.core.util.progress.ToolingApiWorkspaceJob.runInWorkspace(
Caused by: java.lang.IllegalStateException: Workspace already contains a project with name customactions.
at org.eclipse.buildship.core.workspace.internal.DefaultWorkspaceOperations.includeProject(
… 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.


We are aware of this, if you want to track the updates on this story you can subscribe to the corresponding Bugzilla entry.

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

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

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?

I will boil it down to the simplest possible example.