Eclipse上的BuildShip Gradle插件,报告" syncrhonize gradle项目工作区失败"

时间:2017-04-18 06:14:10

标签: java eclipse gradle buildship

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)

我的设置。格式是

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' 

我的build.gradle有

    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')

2 个答案:

答案 0 :(得分:0)

eclipse的BuildShip插件不支持多项目。他们没有计划包括这种支持。

Link到确认此内容的博客文章

我会找出哪个插件支持eclipse并更新这个答案。

答案 1 :(得分:0)

所以我注意到“settings.gradle”文件正在设置根项目名称,在项目重命名后,它仍然具有旧名称。一旦我将该名称更改为新名称并刷新了该项目,该错误就消失了。

实际上这个错误是因为Eclipse,Ideallyeclips应该重构整个项目但不重构settings.gradle文件。