我一直在尝试将我的项目推入maven存储库,并尝试正确地配置我的maven gpg插件,我目前使用它作为
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>package</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>但是它似乎找不到我的工件,因为它给出了rr
Failed to execute goal org.apache.maven.plugins:maven-gpg-plugin:1.6:sign (default-cli) on project fitnesse-bootstrap-plus-theme: The project artifact has not been assembled yet. Please do not invoke this goal before the lifecycle phase "package".我的jar在根/target文件夹中生成。
发布于 2021-01-11 03:38:38
当您需要安装/部署签名时,您应该将maven-gpg-plugin绑定到在package阶段之后、install和deploy之前执行的阶段verify。
因此,您的配置如下所示:
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>您还可以省略<phase>verify</phase>,因为maven-gpg-plugin是默认的绑定到正确阶段。
https://stackoverflow.com/questions/60651328
复制相似问题