java.lang.IllegalArgumentException: Project location doesn't exist


(Marvin Toll) #1

Being new to Gradle… I’m probably missing something embarrassingly simple.

We have a project with 14 sub-projects at https://github.com/GTCjavaee

When trying to Import the Gradle Project into a new workspace (using the Gradle Eclipse plugin) the log shows the following error when “Build Model” is selected. I’ve verified the that all 14 sub-projects, including the C:\git\jped-config\ext-java-7 sub-project, exist on the file system (having already cloned the Git repository).

Any ideas why the project cannot be imported?

_Marvin

!ENTRY org.springsource.ide.eclipse.gradle.core 4 0 2014-01-03 20:15:22.545 !MESSAGE Project location doesn’t exist: C:\git\jped-config\ext-java-7 !STACK 0 java.lang.reflect.InvocationTargetException

at org.springsource.ide.eclipse.gradle.core.util.GradleRunnable.run(GradleRunnable.java:92)

at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121) Caused by: java.lang.IllegalArgumentException: Project location doesn’t exist: C:\git\jped-config\ext-java-7

at org.eclipse.core.runtime.Assert.isLegal(Assert.java:63)

at org.springsource.ide.eclipse.gradle.core.GradleProject.(GradleProject.java:125)

at org.springsource.ide.eclipse.gradle.core.GradleProjectManager.getOrCreate(GradleProjectManager.java:60)

at org.springsource.ide.eclipse.gradle.core.GradleProjectManager.getOrCreate(GradleProjectManager.java:80)

at org.springsource.ide.eclipse.gradle.core.GradleCore.create(GradleCore.java:170)

at org.springsource.ide.eclipse.gradle.core.GradleModelProvider$GroupedModelProvider.walk(GradleModelProvider.java:316)

at org.springsource.ide.eclipse.gradle.core.GradleModelProvider$GroupedModelProvider.walk(GradleModelProvider.java:321)

at org.springsource.ide.eclipse.gradle.core.GradleModelProvider$GroupedModelProvider.ensureModels(GradleModelProvider.java:292)

at org.springsource.ide.eclipse.gradle.core.GradleProject.getGradleModel(GradleProject.java:633)

at org.springsource.ide.eclipse.gradle.core.GradleProject.getSkeletalGradleModel(GradleProject.java:654)

at org.springsource.ide.eclipse.gradle.ui.wizards.GradleImportWizardPageOne$11.doit(GradleImportWizardPageOne.java:516)

at org.springsource.ide.eclipse.gradle.core.util.GradleRunnable.run(GradleRunnable.java:84)

… 1 more

Root exception: java.lang.IllegalArgumentException: Project location doesn’t exist: C:\git\jped-config\ext-java-7

at org.eclipse.core.runtime.Assert.isLegal(Assert.java:63)

at org.springsource.ide.eclipse.gradle.core.GradleProject.(GradleProject.java:125)

at org.springsource.ide.eclipse.gradle.core.GradleProjectManager.getOrCreate(GradleProjectManager.java:60)

at org.springsource.ide.eclipse.gradle.core.GradleProjectManager.getOrCreate(GradleProjectManager.java:80)

at org.springsource.ide.eclipse.gradle.core.GradleCore.create(GradleCore.java:170)

at org.springsource.ide.eclipse.gradle.core.GradleModelProvider$GroupedModelProvider.walk(GradleModelProvider.java:316)

at org.springsource.ide.eclipse.gradle.core.GradleModelProvider$GroupedModelProvider.walk(GradleModelProvider.java:321)

at org.springsource.ide.eclipse.gradle.core.GradleModelProvider$GroupedModelProvider.ensureModels(GradleModelProvider.java:292)

at org.springsource.ide.eclipse.gradle.core.GradleProject.getGradleModel(GradleProject.java:633)

at org.springsource.ide.eclipse.gradle.core.GradleProject.getSkeletalGradleModel(GradleProject.java:654)

at org.springsource.ide.eclipse.gradle.ui.wizards.GradleImportWizardPageOne$11.doit(GradleImportWizardPageOne.java:516)

at org.springsource.ide.eclipse.gradle.core.util.GradleRunnable.run(GradleRunnable.java:84)

at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)


(René Groeschke) #2

Hello Marvin,

I can reproduce this problem. I think the problem is, that you include “ext-java-7” in your settings.gradle file but the project is located in a directory named “ext-java7” (consider the missing dash).

After renaming ext-java-7 to ext-java7 in the settings.gradle, the eclipse import works as expected.

cheers, René


(Marvin Toll) #3

@Rene… clearly a programming pair is needed!

Fortunately, no one can see my red face (of embarrassment) at the moment.

Doesn’t this happen over and over? When working with a new technology it is so easy to make a typo and then either ‘blame’ or become convinced the issue is a lack of understanding (of the technology).

Thanks for your help… it you’re ever interested in Pattern Enabled Development don’t hesitate to ping me directly.

_Marvin


(René Groeschke) #4

there is definitely no need to be embarrassed! Maybe the error message could be improved to be more helpful in solving the issue.

cheers


(Marvin Toll) #5

Am running into a minor issue with GitHub interaction…

CONTEXT

One. I’ve been committing all files in the .settings/.gradle folder to SCM.

Two. It appears that when a new developer imports the projects the org.springsource.ide.eclipse.gradle.core.prefs file… resets the timestamp:

org.springsource.ide.eclipse.gradle.core.preferences.GradleProjectPreferences Sun Jan 05 10:39:46 EST 2014

Three. This causes an indication that the file has changed and the developer is not clear whether the changed file should be pushed to GitHub.

QUESTION

Would it be better to…

A. Add this file to .gitignore?

B. Add the folder to .gitignore?

C. Other???


(Peter Niederwieser) #6

Neither ‘.settings’ nor ‘.gradle’ should be put under source control.


(Marvin Toll) #7

Thanks… looks like there is consensus on this… for example:

https://github.com/tsgrp/OpenContent/wiki/Creating-a-New-OC-Project