私は単純なプロジェクトを持っていますが、BinTray経由でMavenに公開しようとしていますが、エラーが発生しています。JavaプロジェクトをGradleでBinTray経由でMavenに公開できません
私はbintrayに公開するためのガイドに従っており、BinTrayがすべてセットアップされ、Sonatypeにアクセスできるように見えます。署名/ etc、すべてが良いようです。
「./gradlew bintrayUpload」を実行するとエラーが表示されますが、アーティファクトはbintrayに表示されます。しかし、私は様々なPOMエラーを取得します。
adams-MBP:UsedUtil adamhammer2$ ./gradlew clean install
:clean
:compileJava
warning: [options] bootstrap class path not set in conjunction with -source 1.7
Note: /Users/adamhammer2/git/UsedUtil/src/main/java/com/mysaasa/usedutil/CallKeyGenerator.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 warning
:processResources UP-TO-DATE
:classes
:jar
:javadoc
:javadocJar
:sourcesJar
:install
BUILD SUCCESSFUL
Total time: 7.233 secs
adams-MBP:UsedUtil adamhammer2$ ./gradlew bintrayUpload
:compileJava UP-TO-DATE
:processResources UP-TO-DATE
:classes UP-TO-DATE
:jar UP-TO-DATE
:javadoc UP-TO-DATE
:javadocJar UP-TO-DATE
:sourcesJar UP-TO-DATE
:install
:bintrayUpload FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':bintrayUpload'.
> Could not upload to 'https://api.bintray.com/content/adamhammer/maven/used-util/0.9.1/com/mysaasa/used_util/UsedUtil/0.9.1/UsedUtil-0.9.1.pom': HTTP/1.1 400 Bad Request [message:Unable to upload files: Maven group, artifact or version defined in the pom file do not match the file path 'com/mysaasa/used_util/UsedUtil/0.9.1/UsedUtil-0.9.1.pom']
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 12.923 secs
のGitHubプロジェクトhttps://github.com/ahammer/UsedUtil
build.gradleファイルで、私はエラーを取得する公開後
buildscript {
repositories {
mavenCentral()
jcenter()
}
dependencies {
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.4'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
}
}
apply plugin: 'java'
sourceCompatibility = 1.7
repositories {
mavenCentral()
}
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.+'
}
ext {
bintrayRepo = 'maven'
bintrayName = 'used-util'
publishedGroupId = 'com.mysaasa.used_util'
libraryName = 'UsedUtil'
artifact = 'usedutil'
libraryDescription = 'A Library for tracking usage in java projects'
siteUrl = 'http://ahammer.github.io/UsedUtil'
gitUrl = 'https://github.com/ahammer/UsedUtil.git'
libraryVersion = '0.9.1'
developerId = 'adamhammer'
developerName = 'Adam Hammer'
developerEmail = '[email protected]'
licenseName = 'The Apache Software License, Version 2.0'
licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
allLicenses = ["Apache-2.0"]
}
apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/installv1.gradle'
apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/bintrayv1.gradle'
である、しかしBinTrayでは、アップロードを登録します。しかし、JCenterへの追加をクリックすると、別のエラーが表示されます。「POMファイルをパッケージの最新バージョンに追加してください。代わりに、サードパーティのスクリプトや日付のプラグインのうち、使用の
おそらく、bintrayプラグインのバグです。一見、 'used_util'にアップロードしようとしましたが、あなたは' used-util'に名前を設定しました。プラグインの最新バージョンを試してください。アーティファクト名に単語以外の文字が含まれないようにしてください。 – dpr