我将 java-8 升级到 java-11,从那时起我在 gmaven-plugin 上遇到错误:
在定位 org.codehaus.groovy.maven.plugin.execute.ExecuteMojo 时,在 org.codehaus.groovy.maven.plugin.execute.ExecuteMojo.(未知来源)注入构造函数时出错,java.lang.ExceptionInInitializerError
[错误] 无法执行目标 org.codehaus.groovy.maven:gmaven-plugin:1.0:execute (tmp-id) on project project-name: Execution tmp-id of goal org.codehaus.groovy.maven:gmaven-plugin :1.0:执行失败:由于API不兼容,无法在插件“org.codehaus.groovy.maven:gmaven-plugin:1.0”中加载mojo“执行”:org.codehaus.plexus.component.repository.exception。组件查找异常:空
<plugin>
<groupId>org.codehaus.groovy.maven</groupId>
<artifactId>gmaven-plugin</artifactId>
<executions>
<execution>
<id>tmp-id</id>
<phase>install</phase>
<goals>
<goal>execute</goal>
</goals>
<configuration>
<source>
println 'Hello'
</source>
</configuration>
</execution>
</executions>
</plugin>
有任何想法吗?