使用gabula.release和gabula.gabula-bintray-publishing插件可以在文件名中正确设置版本,但不能在文件路径中正确设置版本。错误信息如下。
could not upload to'https://api.bintray.com/content/[secure]/maven/axon kotlin/unspecified/com/tylerthrailkill/axon kotlin/0.0.2/axon-kotlin-0.0.2-sources.jar':http/1.1 409 conflict[message:unable to upload files:an artifact with the path'com/tylerthrailkill/axon kotlin/0.0.2/axon-kotlin-0.0.2-sources.jar'已经存在]
忽略已经存在的关于它的部分,我只是反复尝试使用相同的版本号,直到路径正确为止。
这就是我在垃圾桶里看到的。
以下是我的梯度文件:
生成.渐变
插件{
ID‘Nebula.Kotlin’版本‘1.2.50’
id'nebula.maven发布'8.0.0版'
ID‘星云信息’版本‘3.7.1’
ID“nebula.source jar”版本“8.0.0”
ID“Nebula.JavaDoc JAR”版本“8.0.0”
ID‘Nebula.Nebula Bintray Publishing’版本‘3.5.4’
ID“星云。发布”版本“6.3.5”
}
应用自:“publishing.gradle”
“com.tylerthrailkill”组
//不要指定版本,因为发布插件
存储库{
小牛脑()
Mavenlocal()。
}
def axonversion='3.2.2'
依赖项{
//编译“org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.2.41”
编译组:“org.axonframework”,名称:“axon core”,版本:axon version
编译组:“org.axonframework”,名称:“axon test”,版本:axon version
编译组:“org.hamcrest”,名称:“hamcrest all”,版本:“1.3”
测试“org.junit.jupiter:junit jupiter api:5.0.3”
testruntimeonly'org.junit.jupiter:junit jupiter引擎:5.0.3'
测试编译组:“org.hamcrest”,名称:“hamcrest all”,版本:“1.3”
测试编译“com.nharman:mockito kotlin:1.5.0”
测试编译“org.jetbrains.kotlin:kotlin测试:1.2.41”
测试编译组:“org.axonframework”,名称:“axon core”,版本:axon version
测试编译组:“org.axonframework”,名称:“axon test”,版本:axon version
}
测试{
使用JUnitPlatform()
//始终运行测试,即使没有任何更改。
取决于“清洁测试”
//显示测试结果。
测试日志记录{
事件“通过”、“跳过”、“失败”
}
}
出版.gradle
bintray{
用户=findproperty(“bintrayuser”)?:system.getenv('bintray_user')
键=findproperty(“bintraykey”)?:system.getenv('bintray_key')
包装{
userorg='myusername'
repo='maven'
name='Axon Kotlin'
许可证=['mit']
vcsurl='https://github.com/snowe2010/axon-kotlin.git'
websiteurl='https://github.com/snowe2010/$项目名称
issuetracker url='https://github.com/snowe2010/$project.name/issues'
vcsurl='https://github.com/snowe2010/$project.name.git'
labels=['axon'、'kotlin']
}
}
忽略已经存在的关于它的部分,我只是反复尝试使用相同的版本号,直到路径正确为止。
这就是我在垃圾桶里看到的。
以下是我的Gradle文件:
建筑.gradle
plugins {
id 'nebula.kotlin' version '1.2.50'
id 'nebula.maven-publish' version '8.0.0'
id 'nebula.info' version '3.7.1'
id "nebula.source-jar" version "8.0.0"
id "nebula.javadoc-jar" version "8.0.0"
id 'nebula.nebula-bintray-publishing' version '3.5.4'
id 'nebula.release' version '6.3.5'
}
apply from: 'publishing.gradle'
group 'com.tylerthrailkill'
// don't specify version because release plugin does
repositories {
mavenCentral()
mavenLocal()
}
def axonVersion = '3.2.2'
dependencies {
// compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.2.41"
compile group: "org.axonframework", name: "axon-core", version: axonVersion
compile group: "org.axonframework", name: "axon-test", version: axonVersion
compile group: 'org.hamcrest', name: 'hamcrest-all', version: '1.3'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.0.3'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.0.3'
testCompile group: 'org.hamcrest', name: 'hamcrest-all', version: '1.3'
testCompile "com.nhaarman:mockito-kotlin:1.5.0"
testCompile "org.jetbrains.kotlin:kotlin-test:1.2.41"
testCompile group: "org.axonframework", name: "axon-core", version: axonVersion
testCompile group: "org.axonframework", name: "axon-test", version: axonVersion
}
test {
useJUnitPlatform()
// Always run tests, even when nothing changed.
dependsOn 'cleanTest'
// Show test results.
testLogging {
events "passed", "skipped", "failed"
}
}
出版.gradle
bintray {
user = findProperty('bintrayUser') ?: System.getenv('BINTRAY_USER')
key = findProperty('bintrayKey') ?: System.getenv('BINTRAY_KEY')
pkg {
userOrg = 'myusername'
repo = 'maven'
name = 'Axon-Kotlin'
licenses = ['MIT']
vcsUrl = 'https://github.com/snowe2010/axon-kotlin.git'
websiteUrl = 'https://github.com/snowe2010/${project.name}'
issueTrackerUrl = 'https://github.com/snowe2010/${project.name}/issues'
vcsUrl = 'https://github.com/snowe2010/${project.name}.git'
labels = ['axon', 'kotlin']
}
}