Hello!
So in my gradle project, I want to upload my jar to multiple maven repository, so I do the following:
uploadArchives {
repositories {
mavenLocal()
mavenDeployer {
repository(url: maven_repo_1) {
authentication(userName: maven_user_1, password: maven_password_1)
}
repository(url: maven_repo_2) {
authentication(userName: maven_user_2, password: maven_password_2)
}
}
}
}
My questions are:
- Is this the correct way to upload to multiple maven repository at once?
- Is there a way to use a parameters to upload to specific maven repository? I.e uploadArchives -r mavenLocal
Note: Previously I had to remove the maven repository and run uploadArchives, I don’t think this is the best practice. However I didn’t find documentation for uploading it with parameters.
Thanks!