I´m using Eclipse 442 and Buildship plugin 1.0.5. I´ve imported a working multi project structure into Eclipse using the Buildship import wizard. The imported project seems to work fine (means they build), but I was observing the following issues:
-
The buildship plugin creates a “technical” Eclipse project for the imported project containing only a .settings folder with a gradle.prefs file as well as a .project file. All other files / folders from the root of the multi project structure (.gradle, gradle, build.gradle, gradlew.*, settings.gradle) still remain in the root of the workspace. In Eclipse these files and folders are not visible and thus not editable. Another problem is that such files / folders can not be checked in from within Eclipse because it does not support files beeing at the root of the workspace (only project folders)
-
When doing a Gradle > Refresh Gradle project the following exception occurs:
org.eclipse.buildship.core.GradlePluginsRuntimeException: Cannot create Eclipse project gradledemo. at org.eclipse.buildship.core.workspace.internal.DefaultWorkspaceOperations.createProject(DefaultWorkspaceOperations.java:159) at org.eclipse.buildship.core.workspace.internal.DefaultWorkspaceGradleOperations.addNewEclipseProjectToWorkspace(DefaultWorkspaceGradleOperations.java:226) at org.eclipse.buildship.core.workspace.internal.DefaultWorkspaceGradleOperations.synchronizeNonWorkspaceProject(DefaultWorkspaceGradleOperations.java:193) 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:38) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) Caused by: org.eclipse.core.internal.resources.ResourceException: Resource '/wsp_gradledemo5' already exists. at org.eclipse.core.internal.resources.Resource.checkDoesNotExist(Resource.java:320) at org.eclipse.core.internal.resources.Resource.checkDoesNotExist(Resource.java:307) at org.eclipse.core.internal.resources.Project.assertCreateRequirements(Project.java:52) at org.eclipse.core.internal.resources.Project.create(Project.java:287) at org.eclipse.core.internal.resources.Project.create(Project.java:269) at org.eclipse.buildship.core.workspace.internal.DefaultWorkspaceOperations.createProject(DefaultWorkspaceOperations.java:144) ... 10 more
From now on the files from the “technical” project folder (that Buildship created) are removed and the Gradle nature is gone (means no Gradle > Refresh Gradle project is available anymore, which is necessary when adding new dependencies.
So now my question is, how can I work with multi project configurations within Eclipse and Buildship? Is there an example / tutorial or any advice how to get this working?