title: Could not fetch model of type 'EclipseProject' using Gradle distribution
body: <p>I get the following exception while importing a Gradle project in Eclipse Neon (Buildship 1.0.18 / Gradle IDE 3.8.1 ):</p>
  
  <pre><code>org.gradle.tooling.GradleConnectionException: Could not fetch model of type 'EclipseProject' using Gradle distribution 'https://services.gradle.org/distributions/gradle-3.0-bin.zip'.
      at org.gradle.tooling.internal.consumer.ExceptionTransformer.transform(ExceptionTransformer.java:55)
      at org.gradle.tooling.internal.consumer.ExceptionTransformer.transform(ExceptionTransformer.java:29)
      at org.gradle.tooling.internal.consumer.ResultHandlerAdapter.onFailure(ResultHandlerAdapter.java:41)
      at org.gradle.tooling.internal.consumer.async.DefaultAsyncConsumerActionExecutor$1$1.run(DefaultAsyncConsumerActionExecutor.java:57)
      at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54)
      at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at java.lang.Thread.run(Thread.java:745)
      at org.gradle.tooling.internal.consumer.BlockingResultHandler.getResult(BlockingResultHandler.java:46)
      at org.gradle.tooling.internal.consumer.DefaultModelBuilder.get(DefaultModelBuilder.java:51)
      at com.gradleware.tooling.toolingclient.internal.DefaultToolingClient.executeAndWait(DefaultToolingClient.java:106)
      at com.gradleware.tooling.toolingclient.internal.DefaultModelRequest.executeAndWait(DefaultModelRequest.java:79)
      at com.gradleware.tooling.toolingmodel.repository.internal.BaseModelRepository$1.get(BaseModelRepository.java:95)
      at com.gradleware.tooling.toolingmodel.repository.internal.BaseModelRepository.executeAndWait(BaseModelRepository.java:163)
      at com.gradleware.tooling.toolingmodel.repository.internal.BaseModelRepository.access$000(BaseModelRepository.java:41)
      at com.gradleware.tooling.toolingmodel.repository.internal.BaseModelRepository$2.call(BaseModelRepository.java:121)
      at com.google.common.cache.LocalCache$LocalManualCache$1.load(LocalCache.java:4724)
      at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3522)
      at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2315)
      at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2278)
      at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2193)
      at com.google.common.cache.LocalCache.get(LocalCache.java:3932)
      at com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:4721)
      at com.gradleware.tooling.toolingmodel.repository.internal.BaseModelRepository.getFromCache(BaseModelRepository.java:138)
      at com.gradleware.tooling.toolingmodel.repository.internal.BaseModelRepository.executeRequest(BaseModelRepository.java:117)
      at com.gradleware.tooling.toolingmodel.repository.internal.BaseModelRepository.executeRequest(BaseModelRepository.java:88)
      at com.gradleware.tooling.toolingmodel.repository.internal.DefaultSingleBuildModelRepository.fetchEclipseGradleBuild(DefaultSingleBuildModelRepository.java:185)
      at org.eclipse.buildship.core.workspace.internal.DefaultModelProvider.fetchEclipseGradleBuild(DefaultModelProvider.java:53)
      at org.eclipse.buildship.core.workspace.internal.SynchronizeGradleBuildsJob.synchronizeBuild(SynchronizeGradleBuildsJob.java:77)
      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:61)
      at org.eclipse.buildship.core.util.progress.ToolingApiJob.run(ToolingApiJob.java:70)
      at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
  Caused by: java.lang.IllegalArgumentException
      at com.google.common.base.Preconditions.checkArgument(Preconditions.java:111)
      at org.gradle.plugins.ide.eclipse.model.Link.&lt;init&gt;(Link.java:36)
      at org.gradle.plugins.ide.eclipse.internal.LinkedResourcesCreator.links(LinkedResourcesCreator.java:42)
      at org.gradle.plugins.ide.eclipse.EclipsePlugin$2$2$1.call(EclipsePlugin.java:182)
      at org.gradle.plugins.ide.eclipse.EclipsePlugin$2$2$1.call(EclipsePlugin.java:179)
      at org.gradle.util.GUtil.uncheckedCall(GUtil.java:401)
      at org.gradle.api.internal.ConventionAwareHelper$2.getValue(ConventionAwareHelper.java:84)
      at org.gradle.api.internal.ConventionAwareHelper$MappedPropertyImpl.getValue(ConventionAwareHelper.java:133)
      at org.gradle.api.internal.ConventionAwareHelper.getConventionValue(ConventionAwareHelper.java:111)
      at org.gradle.plugins.ide.eclipse.model.EclipseProject_Decorated.getLinkedResources(Unknown Source)
      at org.gradle.plugins.ide.internal.tooling.EclipseModelBuilder.populate(EclipseModelBuilder.java:217)
      at org.gradle.plugins.ide.internal.tooling.EclipseModelBuilder.buildAll(EclipseModelBuilder.java:113)
      at org.gradle.plugins.ide.internal.tooling.EclipseModelBuilder.buildAll(EclipseModelBuilder.java:67)
      at org.gradle.tooling.internal.provider.runner.BuildModelActionRunner.createModelResult(BuildModelActionRunner.java:76)
      at org.gradle.tooling.internal.provider.runner.BuildModelActionRunner.run(BuildModelActionRunner.java:67)
      at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
      at org.gradle.tooling.internal.provider.runner.SubscribableBuildActionRunner.run(SubscribableBuildActionRunner.java:58)
      at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
      at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:43)
      at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:28)
      at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:82)
      at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:49)
      at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:59)
      at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
      at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
      at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:49)
      at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
      at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:26)
      at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
      at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.java:34)
      at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
      at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:74)
      at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:72)
      at org.gradle.util.Swapper.swap(Swapper.java:38)
      at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:72)
      at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
      at org.gradle.launcher.daemon.server.exec.LogAndCheckHealth.execute(LogAndCheckHealth.java:55)
      at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
      at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:60)
      at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
      at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
      at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:72)
      at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
      at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
      at org.gradle.launcher.daemon.server.exec.HintGCAfterBuild.execute(HintGCAfterBuild.java:44)
      at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
      at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:50)
      at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:240)
      at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54)
      at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at java.lang.Thread.run(Thread.java:745)
  </code></pre>
  
  <p>I found almost the same exception here: <a href="https://stackoverflow.com/questions/32029093/could-not-fetch-model-of-type-eclipseproject-using-gradle">Could not fetch model of type &#39;EclipseProject&#39; using Gradle</a>
  but the solution was to use the latest Gradle version (currently 3.0)</p>
  
  <p>The same scenario was reported on <a href="https://discuss.gradle.org/t/could-not-fetch-model-error-when-converting-project-to-gradle-using-buildship/19022" rel="nofollow noreferrer">https://discuss.gradle.org/t/could-not-fetch-model-error-when-converting-project-to-gradle-using-buildship/19022</a> but with no answers so far.</p>
  
  <p>The reported resource is available for download: <a href="https://services.gradle.org/distributions/gradle-3.0-bin.zip" rel="nofollow noreferrer">https://services.gradle.org/distributions/gradle-3.0-bin.zip</a></p>
  
  <p>Does anybody have workarounds for this problem? Thank you.</p>