Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Gradle Buildship plugin error on import project
Gradle Buildship plugin error on import project [message #1734355] Tue, 07 June 2016 11:47 Go to next message
Diamantis Karagkiaouris is currently offline Diamantis KaragkiaourisFriend
Messages: 8
Registered: March 2016
Junior Member
Hello,

I have a project with the following directory tree:

Project:

  • Common
  • EJB
  • Webapp
  • GWT
    • Webapp
    • EJB



Eclipse Gradle Buildship Plugin can only partially import this project. From these modules only Common, EJB and Webapp are imported and it throws an exception for the GWT module. Specifically:

java.lang.IllegalArgumentException: Path for project must have only one segment.
	at org.eclipse.core.runtime.Assert.isLegal(Assert.java:63)
	at org.eclipse.core.internal.resources.WorkspaceRoot.getProject(WorkspaceRoot.java:147)
	at org.eclipse.buildship.core.workspace.internal.DefaultWorkspaceOperations.createProject(DefaultWorkspaceOperations.java:129)
	at org.eclipse.buildship.core.workspace.internal.SynchronizeGradleBuildOperation.addNewEclipseProjectToWorkspace(SynchronizeGradleBuildOperation.java:272)
	at org.eclipse.buildship.core.workspace.internal.SynchronizeGradleBuildOperation.synchronizeNonWorkspaceProject(SynchronizeGradleBuildOperation.java:255)
	at org.eclipse.buildship.core.workspace.internal.SynchronizeGradleBuildOperation.synchronizeGradleProjectWithWorkspaceProject(SynchronizeGradleBuildOperation.java:180)
	at org.eclipse.buildship.core.workspace.internal.SynchronizeGradleBuildOperation.synchronizeGradleBuildWithWorkspace(SynchronizeGradleBuildOperation.java:143)
	at org.eclipse.buildship.core.workspace.internal.SynchronizeGradleBuildOperation.access$000(SynchronizeGradleBuildOperation.java:108)
	at org.eclipse.buildship.core.workspace.internal.SynchronizeGradleBuildOperation$1.run(SynchronizeGradleBuildOperation.java:125)
	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:122)
	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:63)
	at org.eclipse.buildship.core.util.progress.ToolingApiJob.run(ToolingApiJob.java:70)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

I change the structure:

Project:

  • Common
  • EJB
  • Webapp
  • GWT_Webapp
  • GWT_EJB


but the error remains. Is this a bug of the plugin? Because i can build it in the command line.

Thank you very much
Re: Gradle Buildship plugin error on import project [message #1734410 is a reply to message #1734355] Wed, 08 June 2016 06:37 Go to previous message
Diamantis Karagkiaouris is currently offline Diamantis KaragkiaourisFriend
Messages: 8
Registered: March 2016
Junior Member
I have figure out what was happening. The Gradle buildship plugin creates new projects in workspace based on the gradle project name. So in my case if the gradle project name was:

project('A/B')

eclipse was trying to create a A/B project which is invalid. The solution to this is to add in settings,gradle the following statement:

include 'C'
project(':C').projectDir = new File('A/B')


also the project(':C') must replace the project(':A/B') in build.gradle

I hope it helps!
Previous Topic:Eclipse will not start on SunOS. libgtk-x11-2.0.so.0: open failed: No such file or directory
Next Topic:Error: terminated javaw.exe
Goto Forum:
  


Current Time: Sun Aug 25 05:50:34 GMT 2019

Powered by FUDForum. Page generated in 0.07247 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top