我正在使用Maven构建一个WebAPI.war文件。我面临的问题是没有生成目标war文件。在上运行这个程序后,我发现了pom.xml中缺少的目标。
未能执行目标org.codehaus.gmaven:gmaven-plugin:1.5:在项目org.codehaus.gmaven:gmaven-plugin:1.5:execute: WebAPI上执行(add分支-info):Execution git-
-info of目标值org.codehaus.gmaven:gmaven-plugin:1.5:失败:在执行WebAPI java.lang.ExceptionInInitializerError: null时遇到API不兼容性
这是错误所暗示的pom.xml的一部分。
任何帮助都是非常感谢的!
<plugin>
<groupId>org.codehaus.gmaven</groupId>
<artifactId>gmaven-plugin</artifactId>
<version>1.5</version>
<executions>
<execution>
<id>add-git-branch-info</id>
<phase>generate-resources</phase>
<goals>
<goal>execute</goal>
</goals>
<configuration>
<source>
if (project.properties.getProperty("git.branch") == null) project.properties.setProperty("git.branch", "*");
if (project.properties.getProperty("git.commit.id.abbrev") == null) project.properties.setProperty("git.commit.id.abbrev", "*");
</source>
</configuration>
</execution>
</executions>
</plugin>发布于 2022-09-22 13:59:10
GMaven插件缺少指定要使用哪个groovy版本的providerSelection:
<plugin>
<groupId>org.codehaus.gmaven</groupId>
<artifactId>gmaven-plugin</artifactId>
<version>1.5</version>
<executions>
<execution>
<id>add-git-branch-info</id>
<phase>generate-resources</phase>
<goals>
<goal>execute</goal>
</goals>
<configuration>
<providerSelection>2.0</providerSelection>
<source>
if (project.properties.getProperty("git.branch") == null) project.properties.setProperty("git.branch", "*");
if (project.properties.getProperty("git.commit.id.abbrev") == null) project.properties.setProperty("git.commit.id.abbrev", "*");
</source>
</configuration>
</execution>
</executions>
</plugin>https://stackoverflow.com/questions/73815835
复制相似问题