如果项目已经上传到 bintray 并与 jcenter 同步,如何更改 groupid?
How to change groupid if project is already uploaded to bintray and synced with jcenter?
我最近将我的 github 项目上传到 bintray,并成功地将它与 JCenter 存储库同步。
我使用了这个教程:
http://inthecheesefactory.com/blog/how-to-upload-library-to-jcenter-maven-central-as-dependency/en
所以我的 gradle 依赖是:
dependencies {
compile 'com.github.danylo2006:hashtag-helper:1.1.0'
}
为了上传它,我修改了我的 build.gradle 并添加了相关的脚本。一切如教程中所述。
... some code here
ext {
bintrayRepo = 'maven'
bintrayName = 'hashtag-helper'
publishedGroupId = 'com.github.danylo2006'
libraryName = 'HashTagHelper'
artifact = 'hashtag-helper'
libraryDescription = 'This is a library designed for highlighting hashtags ("#example") and catching click on them.'
siteUrl = 'https://github.com/danylo2006/HashTagHelper'
gitUrl = 'https://github.com/danylo2006/HashTagHelper.git'
libraryVersion = '1.1.0'
developerId = 'danylovolokh'
developerName = 'Danylo Volokh'
developerEmail = 'v.danylo@gmail.com'
licenseName = 'The Apache Software License, Version 2.0'
licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
allLicenses = ["Apache-2.0"]
}
这是棘手的部分:
我已经将 github 昵称 danylo2006 更改为 danylovolokh 现在我想更改 gradle依赖:
dependencies {
compile 'com.github.danylo2006:hashtag-helper:1.1.0'
}
更改为:
dependencies {
compile 'com.github.danylovolokh:hashtag-helper:1.1.0'
}
- 我从 Sonatype 得到了我需要的 groupId
- 所以我修改了 gradle 脚本。
唯一相关的变化是:
publishedGroupId = 'com.github.danylo2006'
已更改为
publishedGroupId = 'com.github.danylovolokh'
我运行相关命令:
gradlew 安装
gradlew bintrayUpload
我得到了BUILD_SUCCESSFULL
但是如果我向任何其他 gradle 项目添加新的依赖项,我会得到一个错误 "Error:(36, 13) Failed to resolve: com.github.danylovolokh:hashtag-helper:1.1.0"
包含到 JCenter 是通过您的 groupId 路径完成的。 JFrog 还需要包含从您的包到 JCenter 的新路径。
请通过 support@bintray.com
联系 JFrog 支持
@JBaruch 是正确的。似乎通过电子邮件发送 bintray 是真正改变这些事情的正确方法。但为了完整起见,我附上了从 Bintray 收到的回复。希望发布他们的回复将防止他们被电子邮件轰炸...
对于上下文,我有一个包含包 (groupID:artifact
) 的 java
存储库:
io.jeti.utils:serialize
目前有版本(1.0.0/1.0.1/1.0.2/1.0.3/1.0.4/)使用这个groupID。我要求他们将其更改为
io.jeti:serialize
事实上,我已经使用这个缩短的 groupID 将版本 (1.0.5/1.0.6) 推送到 bintray。这是回应:
We understand your use case. In such cases, we recommend creating a
new package and submit a new inclusion request. Please let me explain,
let's take 'serialize' package from your java repo for example.
Currently it has 2 path prefixes when only one is synced with Jcenter:
io/jeti/utils/serialize/ -> Synced io/jeti/serialize -> doesn't exist
in jcenter
Relinking the new groupId, will cause the old/current groupId
(io/jeti/utils) and its versions (1.0.0/1.0.1/1.0.2/1.0.3/1.0.4/) to
be un-resolvable when since it rely on the old groupId. This might
broke current integrations with your builds and scripts. Therefore,
the best approach is to create a new package (e.g serialize2), submit
a new inclusion request (which includes the new groupId -
io/jeti/serialize) and we will approve it and make it synced with
JCenter. In this case, you will get a full resolution of all of your
existing versions of the package (as well as 1.0.5/1.0.6).
Please let us know how to proceed.
我痛苦地获得的建议是创建一个新的 bintray 包并要求将其发布到新的 groupId。我曾尝试移动现有包,但 48 小时和来自 JFrog 支持的 20 条消息让我无法在旧位置或新位置发布我的原始包,也无法在新位置发布新包。
最后我不得不注册一个新的域名来托管我的项目,因为 bintray 已经有效地拒绝访问我试图更改的 groupId。
我最近将我的 github 项目上传到 bintray,并成功地将它与 JCenter 存储库同步。 我使用了这个教程:
http://inthecheesefactory.com/blog/how-to-upload-library-to-jcenter-maven-central-as-dependency/en
所以我的 gradle 依赖是:
dependencies {
compile 'com.github.danylo2006:hashtag-helper:1.1.0'
}
为了上传它,我修改了我的 build.gradle 并添加了相关的脚本。一切如教程中所述。
... some code here
ext {
bintrayRepo = 'maven'
bintrayName = 'hashtag-helper'
publishedGroupId = 'com.github.danylo2006'
libraryName = 'HashTagHelper'
artifact = 'hashtag-helper'
libraryDescription = 'This is a library designed for highlighting hashtags ("#example") and catching click on them.'
siteUrl = 'https://github.com/danylo2006/HashTagHelper'
gitUrl = 'https://github.com/danylo2006/HashTagHelper.git'
libraryVersion = '1.1.0'
developerId = 'danylovolokh'
developerName = 'Danylo Volokh'
developerEmail = 'v.danylo@gmail.com'
licenseName = 'The Apache Software License, Version 2.0'
licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
allLicenses = ["Apache-2.0"]
}
这是棘手的部分:
我已经将 github 昵称 danylo2006 更改为 danylovolokh 现在我想更改 gradle依赖:
dependencies {
compile 'com.github.danylo2006:hashtag-helper:1.1.0'
}
更改为:
dependencies {
compile 'com.github.danylovolokh:hashtag-helper:1.1.0'
}
- 我从 Sonatype 得到了我需要的 groupId
- 所以我修改了 gradle 脚本。
唯一相关的变化是:
publishedGroupId = 'com.github.danylo2006'
已更改为
publishedGroupId = 'com.github.danylovolokh'
我运行相关命令: gradlew 安装 gradlew bintrayUpload
我得到了BUILD_SUCCESSFULL
但是如果我向任何其他 gradle 项目添加新的依赖项,我会得到一个错误 "Error:(36, 13) Failed to resolve: com.github.danylovolokh:hashtag-helper:1.1.0"
包含到 JCenter 是通过您的 groupId 路径完成的。 JFrog 还需要包含从您的包到 JCenter 的新路径。 请通过 support@bintray.com
联系 JFrog 支持@JBaruch 是正确的。似乎通过电子邮件发送 bintray 是真正改变这些事情的正确方法。但为了完整起见,我附上了从 Bintray 收到的回复。希望发布他们的回复将防止他们被电子邮件轰炸...
对于上下文,我有一个包含包 (groupID:artifact
) 的 java
存储库:
io.jeti.utils:serialize
目前有版本(1.0.0/1.0.1/1.0.2/1.0.3/1.0.4/)使用这个groupID。我要求他们将其更改为
io.jeti:serialize
事实上,我已经使用这个缩短的 groupID 将版本 (1.0.5/1.0.6) 推送到 bintray。这是回应:
We understand your use case. In such cases, we recommend creating a new package and submit a new inclusion request. Please let me explain, let's take 'serialize' package from your java repo for example. Currently it has 2 path prefixes when only one is synced with Jcenter: io/jeti/utils/serialize/ -> Synced io/jeti/serialize -> doesn't exist in jcenter
Relinking the new groupId, will cause the old/current groupId (io/jeti/utils) and its versions (1.0.0/1.0.1/1.0.2/1.0.3/1.0.4/) to be un-resolvable when since it rely on the old groupId. This might broke current integrations with your builds and scripts. Therefore, the best approach is to create a new package (e.g serialize2), submit a new inclusion request (which includes the new groupId - io/jeti/serialize) and we will approve it and make it synced with JCenter. In this case, you will get a full resolution of all of your existing versions of the package (as well as 1.0.5/1.0.6).
Please let us know how to proceed.
我痛苦地获得的建议是创建一个新的 bintray 包并要求将其发布到新的 groupId。我曾尝试移动现有包,但 48 小时和来自 JFrog 支持的 20 条消息让我无法在旧位置或新位置发布我的原始包,也无法在新位置发布新包。
最后我不得不注册一个新的域名来托管我的项目,因为 bintray 已经有效地拒绝访问我试图更改的 groupId。