Gradle 无法将jar文件上载到jcenter:405代码

Gradle 无法将jar文件上载到jcenter:405代码,gradle,groovy,maven-plugin,jcenter,Gradle,Groovy,Maven Plugin,Jcenter,我有以下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{ implementa

我有以下
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,原因短语:不允许使用方法

我尝试使用
maven publish
插件,但也没有成功


我遗漏了什么?

有什么见解吗?我有同样的issue@ChocolateAndCheese我切换到packagecloud.io,相应地调整了配置,它工作得很好。有兴趣吗?谢谢我也弄明白了。我使用的是nexus,服务器需要一个不同的URL来上传和下载工件。所以我找到了正确的上传URL