【发布时间】:2018-12-21 16:00:42
【问题描述】:
我正在努力将 SNAPSHOT 工件上传到 Sonatype oss。我可以上传工件:https://oss.sonatype.org/content/repositories/snapshots/com/github/st-h/vertx-mongo-streams/2.1.0-SNAPSHOT/
但是,当我尝试将该库用作依赖项时,它总是会尝试下载不存在的版本。例如这是我最新的构建错误:
Could not determine the dependencies of task ':shadowJar'.
> Could not resolve all dependencies for configuration ':runtimeClasspath'.
> Could not find com.github.st-h:vertx-mongo-streams:2.1.0-SNAPSHOT.
Searched in the following locations:
- https://oss.sonatype.org/content/repositories/snapshots/com/github/st-h/vertx-mongo-streams/2.1.0-SNAPSHOT/vertx-mongo-streams-2.1.0-20181221.154759-9.pom
- https://oss.sonatype.org/content/repositories/snapshots/com/github/st-h/vertx-mongo-streams/2.1.0-SNAPSHOT/vertx-mongo-streams-2.1.0-20181221.154759-9.jar
Required by:
project :
可用的最新版本是 *-8。但是,Gradle 会尝试下载 *-9
这是 nexus-stagign-maven-plugin 的最新配置
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.3</version>
<extensions>true</extensions>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>deploy</phase>
<goals>
<goal>deploy</goal>
</goals>
</execution>
</executions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>false</autoReleaseAfterClose>
<skipStagingRepositoryClose>true</skipStagingRepositoryClose>
<autoDropAfterRelease>false</autoDropAfterRelease>
</configuration>
</plugin>
但是,我之前曾尝试在仅启用 autoReleaseAfterClose 的情况下使用它,但显示相同的错误。
【问题讨论】: