gpt4 book ai didi

java - 运行 "Missing Signature"时得到 "mvn deploy"

转载 作者:行者123 更新时间:2023-12-01 13:47:19 26 4
gpt4 key购买 nike

我试图通过 mvn deploy 发布一个 Java 包但得到了 Missing Signature错误。请帮我解决这个错误。谢谢!

Note: I am not very good at asking good questions, please point it out if I should improve this question to make it useful for others.



命令行:
mvn clean source:jar javadoc:jar package deploy
错误信息:
[ERROR] Rule failure while trying to close staging repository with ID "comaliyun-1894".
[ERROR]
[ERROR] Nexus Staging Rules Failure Report
[ERROR] ==================================
[ERROR]
[ERROR] Repository "comaliyun-1894" failures
[ERROR] Rule "signature-staging" failures
[ERROR] * Missing Signature: '/com/aliyun/aliyun-java-sdk-release-test/1.1.1/aliyun-java-sdk-release-test-1.1.1-sources.jar.asc' does not exist for 'aliyun-java-sdk-release-test-1.1.1-sources.jar'.
[ERROR] * Missing Signature: '/com/aliyun/aliyun-java-sdk-release-test/1.1.1/aliyun-java-sdk-release-test-1.1.1-javadoc.jar.asc' does not exist for 'aliyun-java-sdk-release-test-1.1.1-javadoc.jar'.
[ERROR] * Missing Signature: '/com/aliyun/aliyun-java-sdk-release-test/1.1.1/aliyun-java-sdk-release-test-1.1.1.jar.asc' does not exist for 'aliyun-java-sdk-release-test-1.1.1.jar'.
[ERROR] * Missing Signature: '/com/aliyun/aliyun-java-sdk-release-test/1.1.1/aliyun-java-sdk-release-test-1.1.1.pom.asc' does not exist for 'aliyun-java-sdk-release-test-1.1.1.pom'.

我的配置:

在 pom.xml 中:
    <licenses>
<license>
<name></name>
<url></url>
<distribution></distribution>
</license>
</licenses>
<scm>
<url></url>
<connection></connection>
</scm>
<developers>
<developer>
<id>XXX</id>
<name>XXX</name>
<email>XXX@XXX.com</email>
</developer>
</developers>
<distributionManagement>
<snapshotRepository>
<id>sonatype-nexus-snapshots</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>sonatype-nexus-staging</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>


<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.5</version>
<configuration>
<skip>true</skip>
</configuration>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.3</version>
<extensions>true</extensions>
<configuration>
<serverId>sonatype-nexus-staging</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>

在 settings.xml 中:
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
https://maven.apache.org/xsd/settings-1.0.0.xsd">
<localRepository/>
<interactiveMode/>
<usePluginRegistry/>
<offline/>
<pluginGroups/>

<servers>
<server>
<id>sonatype-nexus-snapshots</id>
<username>XXXX</username>
<password>XXXXXX</password>
</server>
<server>
<id>sonatype-nexus-staging</id>
<username>XXXXX</username>
<password>XXXXXX</password>
</server>
</servers>

<mirrors/>
<proxies/>

<profiles>
<profile>
<id>sonatype-nexus-staging</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<gpg.executable>gpg2</gpg.executable>
<gpg.passphrase>XXXXXXX</gpg.passphrase>
</properties>
</profile>
</profiles>

<activeProfiles/>
</settings>

最佳答案

Central 和 OSSRH 的完整部署说明可以在指南中找到 http://central.sonatype.org/pages/producers.html .具体看http://central.sonatype.org/pages/apache-maven.html

关于java - 运行 "Missing Signature"时得到 "mvn deploy",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45030647/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com