maven - Gradle 5.3 发布 SNAPSHOT BadRequest 错误
问题描述
运行 gradle 发布步骤时,我在 circleci 构建中收到错误消息。我正在使用 gradle 5.3 并意识到他们在 5.4.1 中更改了此功能。但是,我不明白为什么这在我使用的版本中失败了。
group = 'com.talentreef.notification.commons'
version = '1.0.0-SNAPSHOT'
publishing {
publications {
maven(MavenPublication) {
from components.java
}
}
repositories {
maven {
def releaseRepoUrl = "https://nexus.trdev.co/nexus/content/repositories/releases"
def snapshotRepoUrl = "https://nexus.trdev.co/nexus/content/repositories/snapshots"
url = version.endsWith('SNAPSHOT') ? snapshotRepoUrl : releaseRepoUrl
credentials {
username = rootProject.ext.nexus.username
password = rootProject.ext.nexus.password
}
}
}
}
* What went wrong:
Execution failed for task ':publishMavenPublicationToMavenRepository'.
> Failed to publish publication 'maven' to repository 'maven'
> Could not write to resource 'https://nexus.trdev.co/nexus/content/repositories/snapshots/com/talentreef/notification/commons/notification-commons/1.0.0-SNAPSHOT/notification-commons-1.0.0-20190619.182943-1.jar'.
> Could not PUT 'https://nexus.trdev.co/nexus/content/repositories/snapshots/com/talentreef/notification/commons/notification-commons/1.0.0-SNAPSHOT/notification-commons-1.0.0-20190619.182943-1.jar'. Received status code 400 from server: Bad Request
好的,所以它似乎失败了,因为存储库是策略类型“发布”而不是快照。
解决方案
推荐阅读
- reactjs - 无法获得未定义的属性“绑定”。Babel 7 + core-js + IE11
- node.js - 从另一个js脚本调用方法时如何处理node-mysql上的数据库延迟
- reporting-services - 使用查找和排除空白和空值的 SQL Server 报表生成器
- sql - 根据日期 BigQuery 将年龄加一岁
- java - 在Java中将布尔信息从一个类传递到另一个类
- r - 在将数据分组到 ggplot 之前添加 geom_smooth()
- php - Wordpress 插件代码是否对公众开放
- c++ - 命名空间方法不能被调用
- javascript - 使用自定义语言在 React 应用程序中突出显示语法
- matlab - 如何在matlab中单独为误差线着色?