nebula release 和 bintray 插件的版本设置为未指定
nebula release and bintray plugin have version set to unspecified
使用 nebula.release 和 nebula.nebula-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' already exists]
忽略它已经存在的部分,我只是反复尝试使用相同的版本号,直到路径正确。
这是我在 bintray 中看到的。
这是我的 gradle 个文件:
build.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"
}
}
publishing.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']
}
}
这显然是我使用的 gradle-bintray-plugin(通过 nebula)版本中的一个错误。已在 gradle-bintray-plugin 1.8.4.
中解决
使用 nebula.release 和 nebula.nebula-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' already exists]
忽略它已经存在的部分,我只是反复尝试使用相同的版本号,直到路径正确。
这是我在 bintray 中看到的。
这是我的 gradle 个文件:
build.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"
}
}
publishing.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']
}
}
这显然是我使用的 gradle-bintray-plugin(通过 nebula)版本中的一个错误。已在 gradle-bintray-plugin 1.8.4.
中解决