gpt4 book ai didi

Eclipse Gradle 插件无法在全新 Luna 安装时检索 Gradle 发行版

转载 作者:行者123 更新时间:2023-12-03 03:43:20 25 4
gpt4 key购买 nike

我真的对 Luna 中的 Gradle 和 Groovy 插件感到沮丧。我最初是从 STS 3.6.4 开始的,但我的 Groovy View 中的许多绑定(bind)根本不起作用,而且我没有收到任何关于此问题的帖子的回复。

然后我决定尝试全新的 Eclipse Luna 安装,然后在上面安装 Groovy 和 Gradle 插件。当我最终导入我的 Groovy 项目时,我看到了奇怪的错误:

org.gradle.jvm.tasks.Jar
Could not fetch model of type 'EclipseProject' using Gradle distribution 'https://services.gradle.org/distributions/gradle-2.2.1-bin.zip'.

我知道 Eclipse Mars 将完全取代这个 Gradle 工具,我只希望我能活到那时。

日志中的堆栈跟踪是这样的:
org.gradle.tooling.BuildException: Could not fetch model of type 'EclipseProject' using Gradle distribution 'https://services.gradle.org/distributions/gradle-2.2.1-bin.zip'.

at org.gradle.tooling.internal.consumer.ResultHandlerAdapter.onFailure(ResultHandlerAdapter.java:57)

at org.gradle.tooling.internal.consumer.async.DefaultAsyncConsumerActionExecutor$1$1.run(DefaultAsyncConsumerActionExecutor.java:57)

at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:64)

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:48)

at org.springsource.ide.eclipse.gradle.core.modelmanager.ToolinApiUtils.buildModel(ToolinApiUtils.java:103)

at org.springsource.ide.eclipse.gradle.core.modelmanager.DefaultModelBuilder.doBuild(DefaultModelBuilder.java:30)

at org.springsource.ide.eclipse.gradle.core.modelmanager.AbstractModelBuilder.buildModel(AbstractModelBuilder.java:40)

at org.springsource.ide.eclipse.gradle.core.modelmanager.HierarchicalProjectBuildStrategy.buildReferenceModel(HierarchicalProjectBuildStrategy.java:179)

at org.springsource.ide.eclipse.gradle.core.modelmanager.HierarchicalProjectBuildStrategy.buildModels(HierarchicalProjectBuildStrategy.java:65)

at org.springsource.ide.eclipse.gradle.core.modelmanager.GradleProjectModelManager.getModelInternal(GradleProjectModelManager.java:141)

at org.springsource.ide.eclipse.gradle.core.modelmanager.GradleProjectModelManager.getModel(GradleProjectModelManager.java:100)

at org.springsource.ide.eclipse.gradle.core.modelmanager.GradleModelManager.getModel(GradleModelManager.java:77)

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

at org.springsource.ide.eclipse.gradle.core.classpathcontainer.ClassPathModel.getClassPathModel(ClassPathModel.java:66)

at org.springsource.ide.eclipse.gradle.core.classpathcontainer.GradleClassPathContainer$1.doit(GradleClassPathContainer.java:134)

at org.springsource.ide.eclipse.gradle.core.util.GradleRunnable$1.run(GradleRunnable.java:53)

at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

Caused by: org.gradle.internal.exceptions.LocationAwareException: A problem occurred configuring root project 'YangUsingProject'.

at org.gradle.initialization.DefaultExceptionAnalyser.transform(DefaultExceptionAnalyser.java:77)

at org.gradle.initialization.MultipleBuildFailuresExceptionAnalyser.transform(MultipleBuildFailuresExceptionAnalyser.java:47)

at org.gradle.initialization.StackTraceSanitizingExceptionAnalyser.transform(StackTraceSanitizingExceptionAnalyser.java:30)

at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:108)

at org.gradle.initialization.DefaultGradleLauncher.getBuildAnalysis(DefaultGradleLauncher.java:97)

at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.configure(InProcessBuildActionExecuter.java:84)

at org.gradle.tooling.internal.provider.BuildModelAction.run(BuildModelAction.java:45)

at org.gradle.tooling.internal.provider.BuildModelAction.run(BuildModelAction.java:30)

at org.gradle.tooling.internal.provider.ConfiguringBuildAction.run(ConfiguringBuildAction.java:119)

at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:36)

at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:26)

at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:47)

at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:34)

at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:119)

at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:35)

at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:119)

at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:24)

at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:119)

at org.gradle.launcher.daemon.server.exec.StartStopIfBuildAndStop.execute(StartStopIfBuildAndStop.java:33)

at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:119)

at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:71)

at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:69)

at org.gradle.util.Swapper.swap(Swapper.java:38)

at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:69)

at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:119)

at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:60)

at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:34)

at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:119)

at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:70)

at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:34)

at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:119)

at org.gradle.launcher.daemon.server.exec.DaemonHygieneAction.execute(DaemonHygieneAction.java:39)

at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:119)

at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:46)

at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:246)

at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:64)

Caused by: org.gradle.api.ProjectConfigurationException: A problem occurred configuring root project 'YangUsingProject'.

at org.gradle.configuration.project.LifecycleProjectEvaluator.addConfigurationFailure(LifecycleProjectEvaluator.java:91)

at org.gradle.configuration.project.LifecycleProjectEvaluator.notifyAfterEvaluate(LifecycleProjectEvaluator.java:86)

at org.gradle.configuration.project.LifecycleProjectEvaluator.evaluate(LifecycleProjectEvaluator.java:65)

at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:504)

at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:83)

at org.gradle.execution.TaskPathProjectEvaluator.configureHierarchy(TaskPathProjectEvaluator.java:42)

at org.gradle.configuration.DefaultBuildConfigurer.configure(DefaultBuildConfigurer.java:35)

at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:129)

at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:106)

... 32 more

Caused by: org.gradle.listener.ListenerNotificationException: Failed to notify project evaluation listener.

at org.gradle.listener.BroadcastDispatch.dispatch(BroadcastDispatch.java:94)

at org.gradle.listener.BroadcastDispatch.dispatch(BroadcastDispatch.java:31)

at org.gradle.messaging.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93)

at com.sun.proxy.$Proxy12.afterEvaluate(Unknown Source)

at org.gradle.configuration.project.LifecycleProjectEvaluator.notifyAfterEvaluate(LifecycleProjectEvaluator.java:79)

... 39 more

Caused by: java.lang.NoClassDefFoundError: org/gradle/jvm/tasks/Jar

at com.att.opnfv.yang.gradle.YangPlugin$_apply_closure1.doCall(YangPlugin.groovy:51)

at org.gradle.listener.ClosureBackedMethodInvocationDispatch.dispatch(ClosureBackedMethodInvocationDispatch.java:40)

at org.gradle.listener.ClosureBackedMethodInvocationDispatch.dispatch(ClosureBackedMethodInvocationDispatch.java:25)

at org.gradle.listener.BroadcastDispatch.dispatch(BroadcastDispatch.java:83)

... 43 more

Caused by: java.lang.ClassNotFoundException: org.gradle.jvm.tasks.Jar

... 47 more

最佳答案

看来我已经设法解决了这个问题,尽管我不确定这里到底发生了什么。

我意识到也许这个“org.gradle.jvm.tasks.Jar”类可能不在它试图下载的 Gradle 版本(2.2.1)中,但是 Gradle 插件或我的构建脚本中的某些东西希望它存在.我确实在我的自定义 Gradle 插件中引用了该任务,所以这可能是导致问题的引用。

我终于进入了 Gradle 首选项,看看它认为它使用的是什么版本的 Gradle,它只说“使用 Gradle Wrapper Default”,不管是什么。我尝试将该属性更改为指向我的 Gradle 2.3 发行版,现在该错误已消失。

关于Eclipse Gradle 插件无法在全新 Luna 安装时检索 Gradle 发行版,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29543362/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com