我一直试图将quarkus集成到我的多模块gradle项目中。我要导入的项目恰好是此结构中的一个模块。
Root Project > Module A > Module B
使用环境:Gradle 6.3,GraalVM-JDK 8和IDE -IntellijIdea 2020。
该项目没有提供任何Web资源输出,但是就像一个核心Java应用程序一样。
因此,我正在使用Quarkus.run(MyProblemSolver.class, args);
这引发
的异常
- 例外是: org.gradle.api.tasks.TaskExecutionException:任务':moduleA:childModule:quarkusDev'的执行失败。 在org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.lambda $ executeIfValid $ 1(ExecuteActionsTaskExecuter.java:205)处 在org.gradle.internal.Try $ Failure.ifSuccessfulOrElse(Try.java:263) 在org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeIfValid(ExecuteActionsTaskExecuter.java:203) 在org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:184) 在org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:114) 在org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute(FinalizePropertiesTaskExecuter.java:46) 在org.gradle.api.internal.tasks.execution.ResolveTaskExecutionModeExecuter.execute(ResolveTaskExecutionModeExecuter.java:62) 在org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:57) 在org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:56) 在org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:36) 在org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter $ 1.executeTask(EventFiringTaskExecuter.java:77) 在org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter $ 1.call(EventFiringTaskExecuter.java:55) 在org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter $ 1.call(EventFiringTaskExecuter.java:52) 在org.gradle.internal.operations.DefaultBuildOperationExecutor $ CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:416) 在org.gradle.internal.operations.DefaultBuildOperationExecutor $ CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:406)处 在org.gradle.internal.operations.DefaultBuildOperationExecutor $ 1.execute(DefaultBuildOperationExecutor.java:165) 在org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:250) 在org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:158) 在org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:102) 在org.gradle.internal.operations.DelegatingBuildOperationExecutor.call(DelegatingBuildOperationExecutor.java:36)处 在org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:52) 在org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:41) 在org.gradle.execution.taskgraph.DefaultTaskExecutionGraph $ InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:372)处 在org.gradle.execution.taskgraph.DefaultTaskExecutionGraph $ InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:359)处 在org.gradle.execution.taskgraph.DefaultTaskExecutionGraph $ BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:352)处 在org.gradle.execution.taskgraph.DefaultTaskExecutionGraph $ BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:338)处 在org.gradle.execution.plan.DefaultPlanExecutor $ ExecutorWorker.lambda $ run $ 0(DefaultPlanExecutor.java:127)中 在org.gradle.execution.plan.DefaultPlanExecutor $ ExecutorWorker.execute(DefaultPlanExecutor.java:191)处 在org.gradle.execution.plan.DefaultPlanExecutor $ ExecutorWorker.executeNextNode(DefaultPlanExecutor.java:182) 在org.gradle.execution.plan.DefaultPlanExecutor $ ExecutorWorker.run(DefaultPlanExecutor.java:124) 在org.gradle.internal.concurrent.ExecutorPolicy $ CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64) 在org.gradle.internal.concurrent.ManagedExecutorImpl $ 1.run(ManagedExecutorImpl.java:48) 在org.gradle.internal.concurrent.ThreadFactoryImpl $ ManagedThreadRunnable.run(ThreadFactoryImpl.java:56) 引起原因:java.lang.NoSuchMethodError:io.quarkus.bootstrap.model.AppModel。(Lio / quarkus / bootstrap / model / AppArtifact; Ljava / util / List; Ljava / util / List;)V 在io.quarkus.gradle.AppModelGradleResolver.resolveModel(AppModelGradleResolver.java:173) 在io.quarkus.gradle.tasks.QuarkusDev.startDev(QuarkusDev.java:239) 在org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:104) 在org.gradle.api.internal.project.taskfactory.StandardTaskAction.doExecute(StandardTaskAction.java:49) 在org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:42) 在org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:28) 在org.gradle.api.internal.AbstractTask $ TaskActionWrapper.execute(AbstractTask.java:727) 在org.gradle.api.internal.AbstractTask $ TaskActionWrapper.execute(AbstractTask.java:694) 在org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter $ 3.run(ExecuteActionsTaskExecuter.java:568) 在org.gradle.internal.operations.DefaultBuildOperationExecutor $ RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:402)处 在org.gradle.internal.operations.DefaultBuildOperationExecutor $ RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:394)处 在org.gradle.internal.operations.DefaultBuildOperationExecutor $ 1.execute(DefaultBuildOperationExecutor.java:165) 在org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:250) 在org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:158) 在org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:92) 在org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31) 在org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:553) 在org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:536) 在org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.access $ 300(ExecuteActionsTaskExecuter.java:109) 在org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter $ TaskExecution.executeWithPreviousOutputFiles(ExecuteActionsTaskExecuter.java:276)处 在org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter $ TaskExecution.execute(ExecuteActionsTaskExecuter.java:265) 在org.gradle.internal.execution.steps.ExecuteStep.lambda $ execute $ 1(ExecuteStep.java:33) 在org.gradle.internal.execution.steps.ExecuteStep.execute(ExecuteStep.java:33) 在org.gradle.internal.execution.steps.ExecuteStep.execute(ExecuteStep.java:26) 在org.gradle.internal.execution.steps.CleanupOutputsStep.execute(CleanupOutputsStep.java:67) 在org.gradle.internal.execution.steps.CleanupOutputsStep.execute(CleanupOutputsStep.java:36) 在org.gradle.internal.execution.steps.ResolveInputChangesStep.execute(ResolveInputChangesStep.java:49) 在org.gradle.internal.execution.steps.ResolveInputChangesStep.execute(ResolveInputChangesStep.java:34) 在org.gradle.internal.execution.steps.CancelExecutionStep.execute(CancelExecutionStep.java:43)处 在org.gradle.internal.execution.steps.TimeoutStep.executeWithoutTimeout(TimeoutStep.java:73) 在org.gradle.internal.execution.steps.TimeoutStep.execute(TimeoutStep.java:54) 在org.gradle.internal.execution.steps.CatchExceptionStep.execute(CatchExceptionStep.java:34) 在org.gradle.internal.execution.steps.CreateOutputsStep.execute(CreateOutputsStep.java:44) 在org.gradle.internal.execution.steps.SnapshotOutputsStep.execute(SnapshotOutputsStep.java:54) 在org.gradle.internal.execution.steps.SnapshotOutputsStep.execute(SnapshotOutputsStep.java:38) 在org.gradle.internal.execution.steps.BroadcastChangingOutputsStep.execute(BroadcastChangingOutputsStep.java:49) 在org.gradle.internal.execution.steps.CacheStep.executeWithoutCache(CacheStep.java:159) 在org.gradle.internal.execution.steps.CacheStep.execute(CacheStep.java:72) 在org.gradle.internal.execution.steps.CacheStep.execute(CacheStep.java:43) 在org.gradle.internal.execution.steps.StoreExecutionStateStep.execute(StoreExecutionStateStep.java:44) 在org.gradle.internal.execution.steps.StoreExecutionStateStep.execute(StoreExecutionStateStep.java:33) 在org.gradle.internal.execution.steps.RecordOutputsStep.execute(RecordOutputsStep.java:38) 在org.gradle.internal.execution.steps.RecordOutputsStep.execute(RecordOutputsStep.java:24) 在org.gradle.internal.execution.steps.SkipUpToDateStep.executeBecause(SkipUpToDateStep.java:92) 在org.gradle.internal.execution.steps.SkipUpToDateStep.lambda $ execute $ 0(SkipUpToDateStep.java:85) 在org.gradle.internal.execution.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:55) 在org.gradle.internal.execution.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:39) 在org.gradle.internal.execution.steps.ResolveChangesStep.execute(ResolveChangesStep.java:76) 在org.gradle.internal.execution.steps.ResolveChangesStep.execute(ResolveChangesStep.java:37) 在org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsFinishedStep.execute(MarkSnapshottingInputsFinishedStep.java:36) 在org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsFinishedStep.execute(MarkSnapshottingInputsFinishedStep.java:26) 在org.gradle.internal.execution.steps.ResolveCachingStateStep.execute(ResolveCachingStateStep.java:94)处 在org.gradle.internal.execution.steps.ResolveCachingStateStep.execute(ResolveCachingStateStep.java:49) 在org.gradle.internal.execution.steps.CaptureStateBeforeExecutionStep.execute(CaptureStateBeforeExecutionStep.java:79)处 在org.gradle.internal.execution.steps.CaptureStateBeforeExecutionStep.execute(CaptureStateBeforeExecutionStep.java:53)处 在org.gradle.internal.execution.steps.ValidateStep.execute(ValidateStep.java:74) 在org.gradle.internal.execution.steps.SkipEmptyWorkStep.lambda $ execute $ 2(SkipEmptyWorkStep.java:78) 在org.gradle.internal.execution.steps.SkipEmptyWorkStep.execute(SkipEmptyWorkStep.java:78)处 在org.gradle.internal.execution.steps.SkipEmptyWorkStep.execute(SkipEmptyWorkStep.java:34) 在org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsStartedStep.execute(MarkSnapshottingInputsStartedStep.java:39) 在org.gradle.internal.execution.steps.LoadExecutionStateStep.execute(LoadExecutionStateStep.java:40) 在org.gradle.internal.execution.steps.LoadExecutionStateStep.execute(LoadExecutionStateStep.java:28) 在org.gradle.internal.execution.impl.DefaultWorkExecutor.execute(DefaultWorkExecutor.java:33) 在org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeIfValid(ExecuteActionsTaskExecuter.java:192) ...另外30个
我不确定我的配置中缺少什么。添加?exttensinos并列出它们的其他gradle命令可以正常工作,但不支持quarkusDev或buildNative。
有人可以指出我在做什么错,因为在互联网上关于这一点的讨论还很少。
答案 0 :(得分:0)
我已经解决了。问题出在pluginVersion
字段的settings.gradle中的版本,我在build.gradle
的类路径中使用了旧版本和相同的更正。 Atleast修复了模型错误。还有其他错误,但可以关闭此问题。使用的版本是
1.0.1
而
1.4.2。最终
必须使用。