I'm using Gradle Buildship plugin in order to build my Eclipse projects.
Gradle itselft is well configured. So, I'm able to build anything from shell.
The gradle project has a root folder and other subprojects.
When I click on Gradle -> Refresh Project
it tells me:
Synchronize Gradle builds with workspace failed due to an unexpected error.
Cannot nest 'living_webapi/src/main/java/com/living/persistence/entities' inside 'living_webapi/src/main/java'. To enable the nesting exclude 'com/' from 'living_webapi/src/main/java'
Java Model Exception: Java Model Status [Cannot nest 'living_webapi/src/main/java/com/living/persistence/entities' inside 'living_webapi/src/main/java'. To enable the nesting exclude 'com/' from 'living_webapi/src/main/java']
at org.eclipse.jdt.internal.core.JavaModelOperation.runOperation(JavaModelOperation.java:786)
at org.eclipse.jdt.internal.core.JavaProject.setRawClasspath(JavaProject.java:3097)
at org.eclipse.jdt.internal.core.JavaProject.setRawClasspath(JavaProject.java:3059)
at org.eclipse.jdt.internal.core.JavaProject.setRawClasspath(JavaProject.java:3112)
at org.eclipse.buildship.core.workspace.internal.SourceFolderUpdater.updateClasspath(SourceFolderUpdater.java:234)
at org.eclipse.buildship.core.workspace.internal.SourceFolderUpdater.updateClasspath(SourceFolderUpdater.java:82)
at org.eclipse.buildship.core.workspace.internal.SourceFolderUpdater.update(SourceFolderUpdater.java:261)
at org.eclipse.buildship.core.workspace.internal.SynchronizeGradleBuildOperation.synchronizeOpenJavaProject(SynchronizeGradleBuildOperation.java:223)
at org.eclipse.buildship.core.workspace.internal.SynchronizeGradleBuildOperation.synchronizeOpenWorkspaceProject(SynchronizeGradleBuildOperation.java:213)
at org.eclipse.buildship.core.workspace.internal.SynchronizeGradleBuildOperation.synchronizeWorkspaceProject(SynchronizeGradleBuildOperation.java:186)
at org.eclipse.buildship.core.workspace.internal.SynchronizeGradleBuildOperation.synchronizeGradleProjectWithWorkspaceProject(SynchronizeGradleBuildOperation.java:176)
at org.eclipse.buildship.core.workspace.internal.SynchronizeGradleBuildOperation.synchronizeGradleBuildWithWorkspace(SynchronizeGradleBuildOperation.java:141)
at org.eclipse.buildship.core.workspace.internal.SynchronizeGradleBuildOperation.access$000(SynchronizeGradleBuildOperation.java:106)
at org.eclipse.buildship.core.workspace.internal.SynchronizeGradleBuildOperation$1.run(SynchronizeGradleBuildOperation.java:123)
at org.eclipse.jdt.internal.core.BatchOperation.executeOperation(BatchOperation.java:39)
at org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:724)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2240)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2267)
at org.eclipse.jdt.core.JavaCore.run(JavaCore.java:5521)
at org.eclipse.jdt.core.JavaCore.run(JavaCore.java:5478)
at org.eclipse.buildship.core.workspace.internal.SynchronizeGradleBuildOperation.run(SynchronizeGradleBuildOperation.java:120)
at org.eclipse.buildship.core.workspace.internal.SynchronizeGradleBuildsJob.synchronizeBuild(SynchronizeGradleBuildsJob.java:78)
at org.eclipse.buildship.core.workspace.internal.SynchronizeGradleBuildsJob.runToolingApiJob(SynchronizeGradleBuildsJob.java:69)
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)
The only thing that worked for me was un-checking the "Allow output folders for source folders" option.
Steps:
I got this problem too. My solution is setting project properties.
In Java build Path -> Source,set output folder to default. For more detail,the image below.
Project Properties -> Java build path -> Source
Source folder output location
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With