尝试使用 gradle 构建 springfox 时,接收器类 org.ajoberstar.grgit.operation.OpenOp 中出现 AbstractMethodError

问题描述 投票:0回答:1

克隆 https://github.com/springfox/springfox springfix repo 后,当我尝试使用

./gradlew clean build -i
命令构建项目时,我总是得到 AbstractMethodError。

* What went wrong:
Receiver class org.ajoberstar.grgit.operation.OpenOp does not define or inherit an implementation of the resolved method abstract setProperty(Ljava/lang/String;Ljava/lang/Object;)V of interface groovy.lang.GroovyObject.

* Exception is:
java.lang.AbstractMethodError: Receiver class org.ajoberstar.grgit.operation.OpenOp does not define or inherit an implementation of the resolved method abstract setProperty(Ljava/lang/String;Ljava/lang/Object;)V of interface groovy.lang.GroovyObject.
        at org.ajoberstar.grgit.internal.OpSyntax$_mapOperation_closure1.doCall(OpSyntax.groovy:17)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at com.sun.proxy.$Proxy84.accept(Unknown Source)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at org.ajoberstar.grgit.internal.OpSyntax.mapOperation(OpSyntax.groovy:16)
        at org.ajoberstar.grgit.internal.OpSyntax$mapOperation.callStatic(Unknown Source)
        at org.ajoberstar.grgit.Grgit.open(Grgit.groovy)
        at org.ajoberstar.grgit.Grgit$open.call(Unknown Source)
        at org.ajoberstar.grgit.gradle.GrgitPlugin.apply(GrgitPlugin.groovy:17)
        at org.ajoberstar.grgit.gradle.GrgitPlugin.apply(GrgitPlugin.groovy)


JAVA version: 
java version "11.0.19" 2023-04-18 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.19+9-LTS-224)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.19+9-LTS-224, mixed mode)
gradle-wrapper.properties 文件中使用的 gradle 是:

distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip
在plugins {}内的build.gradle文件中,它有:

id "org.ajoberstar.grgit" version "4.0.2" id "org.ajoberstar.git-publish" version "3.0.0-rc.1"
在 gradle.org 网站上,我可以看到这篇文章询问相同的错误,但没有提到解决方案:

https://discuss.gradle.org/t/gradle-6-9-2-started-failing-without-changes -receiver-class-org-ajoberstar-grgit-operation-openop-does-not-define-or-inherit-an-implementation-of-the-resolved-method-abstract-setproperty/42172

springfox github issues 部分也提出了类似的问题,但也没有回复。 -

https://github.com/springfox/springfox/issues/4005

如果您也遇到过这个问题,您能帮忙吗?您是如何摆脱它的?

java gradle swagger springfox grgit
1个回答
0
投票
你可以查看我的最新回复

https://github.com/springfox/springfox/issues/4005#issuecomment-1782725503

© www.soinside.com 2019 - 2024. All rights reserved.