gradle - jcenter上传jar文件失败:405代码
问题描述
我有以下build.gradle
文件:
apply plugin:'java'
apply plugin:'groovy'
apply plugin:'eclipse'
apply plugin:'maven'
configurations {
deployerJars
}
repositories{
jcenter()
mavenCentral()
}
version '0.1.2'
group 'io.example'
dependencies{
implementation 'org.codehaus.groovy:groovy-all:2.4.10'
testImplementation 'org.spockframework:spock-core:1.0-groovy-2.4'
}
dependencies{
deployerJars "org.apache.maven.wagon:wagon-http:2.2"
}
uploadArchives {
repositories.mavenDeployer {
configuration = configurations.deployerJars
repository( url:'https://my-private-repo.bintray.com' ){
authentication userName:'myName', password:'secret' }
}
}
如果我运行任务,我会遇到异常:
任务“:uploadArchives”执行失败。
无法发布配置“档案”
未能部署工件:无法传输工件......返回码是:405,ReasonPhrase:方法不允许。
我尝试使用maven-publish
插件也没有运气。
我错过了什么?
解决方案
推荐阅读
- reactjs - 与 npx create-react-app 和 npm i -g create-react-app(-g 无法识别)相关的两个错误在下面详细解释
- python - 发布请求时不允许使用 Flask 405 错误方法
- python - 在 python 中使用 IE selenium 驱动程序
- swift - 无法快速将特定日期和时间添加到 UserNotifications
- reactjs - 混合内容:“https://***********.web.app/”处的页面是通过 HTTPS 加载的,但请求了不安全的资源“http://ec2-/-/-/” -/-/-'
- java - 哪个语句编译速度快?!(condition1 && condition2) 或 !condition1 && !condition2
- pyspark - 比较基于其他列的 PySpark 数据框的某些列?
- azure - 在同一编排步骤 Azure B2C 上的声明交换之间切换
- .net - 功能在 2016 服务器中不起作用,但在 2012 服务器中起作用
- wordpress - 当您单击引导模式按钮(在 wordpress 小部件内部)时,如何打开 Ninja Form