我试图通过mvn deploy
发布Java包但出现Missing Signature
错误。请帮我修复此错误。谢谢!
注意:我不善于提出好的问题,请指出我是否应该改进这个问题以使其对其他人有用。
命令行:
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>
答案 0 :(得分:0)
可以在http://central.sonatype.org/pages/producers.html的指南中找到Central和OSSRH的完整部署说明。具体来看看http://central.sonatype.org/pages/apache-maven.html