Siddharth
Siddharth

Reputation: 9584

BuildShip Gradle plugin on Eclipse, reports "syncrhonize gradle project workspace failed"

Synchronize Gradle projects with workspace failed due to an unsupported configuration in the referenced Gradle build.
Project at '/home/jsiddharth/workspace/v2/mnoxwebservicesv2' can't be named 'mnoxwebserviceendpoints-..' because it's located directly under the workspace root. If such a project is renamed, Eclipse would move the container directory. To resolve this problem, move the project out of the workspace root or configure it to have the name 'mnoxwebservicesv2'.
org.eclipse.buildship.core.UnsupportedConfigurationException: Project at '/home/jsiddharth/workspace/v2/mnoxwebservicesv2' can't be named 'mnoxwebserviceendpoints-..' because it's located directly under the workspace root. If such a project is renamed, Eclipse would move the container directory. To resolve this problem, move the project out of the workspace root or configure it to have the name 'mnoxwebservicesv2'.
    at org.eclipse.buildship.core.workspace.internal.DefaultWorkspaceOperations.validateProjectName(DefaultWorkspaceOperations.java:183)
    at org.eclipse.buildship.core.workspace.internal.ProjectNameUpdater.checkProjectName(ProjectNameUpdater.java:107)
    at org.eclipse.buildship.core.workspace.internal.ProjectNameUpdater.ensureProjectNameIsFree(ProjectNameUpdater.java:71)
    at org.eclipse.buildship.core.workspace.internal.SynchronizeGradleBuildOperation.addNewEclipseProjectToWorkspace(SynchronizeGradleBuildOperation.java:275)
    at org.eclipse.buildship.core.workspace.internal.SynchronizeGradleBuildOperation.synchronizeNonWorkspaceProject(SynchronizeGradleBuildOperation.java:259)
    at org.eclipse.buildship.core.workspace.internal.SynchronizeGradleBuildOperation.synchronizeGradleProjectWithWorkspaceProject(SynchronizeGradleBuildOperation.java:175)
    at org.eclipse.buildship.core.workspace.internal.SynchronizeGradleBuildOperation.access$000(SynchronizeGradleBuildOperation.java:99)
    at org.eclipse.buildship.core.workspace.internal.SynchronizeGradleBuildOperation$1.run(SynchronizeGradleBuildOperation.java:134)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2241)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2225)
    at org.eclipse.buildship.core.workspace.internal.SynchronizeGradleBuildOperation.synchronizeProjectsWithWorkspace(SynchronizeGradleBuildOperation.java:131)
    at org.eclipse.buildship.core.workspace.internal.SynchronizeGradleBuildOperation.run(SynchronizeGradleBuildOperation.java:115)
    at org.eclipse.buildship.core.workspace.internal.SynchronizeGradleBuildsJob.synchronizeBuild(SynchronizeGradleBuildsJob.java:81)
    at org.eclipse.buildship.core.workspace.internal.SynchronizeGradleBuildsJob.runToolingApiJob(SynchronizeGradleBuildsJob.java:72)
    at org.eclipse.buildship.core.util.progress.ToolingApiJob$1.run(ToolingApiJob.java:73)
    at org.eclipse.buildship.core.util.progress.ToolingApiInvoker.invoke(ToolingApiInvoker.java:62)
    at org.eclipse.buildship.core.util.progress.ToolingApiJob.run(ToolingApiJob.java:70)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

My settings.gradle is

rootProject.name = 'mnoxwebserviceendpoints'

include '..:..:mnoxbackendv2:coregeneral',
    '..:..:mnoxbackendv2:databasepojos', 
    '..:..:mnoxbackendv2:backendcommons',
    '..:..:mnoxbackendv2:corehttpclient',
    '..:..:mnoxbackendv2:corehibernate', 
    '..:..:mnoxbackendv2:mnoxcache', 
    '..:..:mnoxbackendv2:coreemailservice',
    '..:..:mnoxbackendv2:coresmsservice', 
    '..:..:mnoxbackendv2:databasecrud', 
        '..:..:mnoxwebservicesv2:mnoxwebservicescommons',
    '..:..:mnoxbackendv2:operationserverendpoints' 

My build.gradle has

    compile project('..:..:mnoxbackendv2:coregeneral')
    compile project('..:..:mnoxbackendv2:databasepojos')
    compile project('..:..:mnoxbackendv2:backendcommons')
    compile project('..:..:mnoxbackendv2:corehttpclient')
    compile project('..:..:mnoxbackendv2:corehibernate')
    compile project('..:..:mnoxbackendv2:mnoxcache')
    compile project('..:..:mnoxbackendv2:coreemailservice')
    compile project('..:..:mnoxbackendv2:coresmsservice')
    compile project('..:..:mnoxbackendv2:databasecrud')
    compile project('..:..:mnoxwebservicesv2:mnoxwebservicescommons')
    compile project('..:..:mnoxbackendv2:operationserverendpoints')

Upvotes: 2

Views: 2177

Answers (3)

Sudeep Biswas
Sudeep Biswas

Reputation: 93

there is an issue with your .project file generated by eclipse, delete the project from eclipse(not directory), reopen existing gradle project, rebuild it, issue will resolve.

Upvotes: 0

Darlesh
Darlesh

Reputation: 176

So I noticed that the "settings.gradle" file was setting the root project name, and after the project rename, it still had the old name. Once I changed that name to the new name and refreshed the project, that error went away.

Actually this error is because of Eclipse,Ideallyeclips should refactor a whole project but it not refactoring settings.gradle file.

Upvotes: 1

Siddharth
Siddharth

Reputation: 9584

Multi projects are not supported by BuildShip plugin of eclipse. And they have no plans to include this support.

Link to the blog post that confirms this

I will find out which plugin supports eclipse and update this answer.

Upvotes: 0

Related Questions