Knotx / knotx

Knot.x is a highly-efficient and scalable integration framework designed to build backend APIs
https://knotx.io
Apache License 2.0
126 stars 26 forks source link

Switch to Bintray/JCenter/JFrog OSS for publishing of artifacts #503

Open tMaxx opened 5 years ago

tMaxx commented 5 years ago

Due to reported constant problems with uploading to ossrh we need to see and check how can we use the repositories provided by Bintray (JCenter and JFrog OSS).

Checklist/progress/TODO:

tMaxx commented 5 years ago

Connections between Bintray, JCenter, JFrog OSS, and Artifactory

JCenter: artifact repo, like Maven Central but better

JFrog Bintray: provides simple per-user or per-organisation artifact repositories. Packages from these repos can be uploaded to JCenter, and then propagated to Maven Central. Bintray can sign the packages via its own GPG key. No snapshot support for OSS projects (available in paid enterprise plan). Bintray keys are used for interacting with every JFrog solution.

JFrog Artifactory: "universal repository manager", enterprise solution for hosting various artifacts, not only Maven's. Also has a Gradle plugin for magically interacting with these repositories.

JFrog OSS: Artifactory repos dedicated for OSS projects, can be used to host releases as well as snapshots. Requires an opt-in request to be submitted for each individual package for hosting there. Two repos available for OSS projects: oss-release-local and oss-snapshot-local.

Remarks and risk analysis

  1. We can use Bintray as-is, without the hassle of interacting with JFrog OSS Artifactory repos, but only releases would be supported (no -SNAPSHOTs).
  2. Setting up snapshot repository @ JFrog OSS could prove to be difficult due to how we have Gradle subplugins set up. There's no option for using Kotlin DSL for configuring Artifactory Gradle Plugin, which ramps up the difficulty by a few orders of magnitude - we might have to develop some kind of custom DSL/middleware that would fix these compatibility problems (and get rid of difficulties in Kotlin-Groovy interop).
  3. Snapshots in JFrog OSS would be hosted at a dedicated URL, different from what we have set up today (another thing to remember when switching all Knot.x subprojects). Releases could still be sync'd to JCenter and Maven Central.
tMaxx commented 5 years ago

Sources, links, worth-a-read

Gradle Bintray Plugin: https://github.com/bintray/gradle-bintray-plugin

Snapshots and Bintray: https://stackoverflow.com/questions/47872069/confused-about-process-to-publish-snapshots-to-bintray

Snapshotting at JFrog OSS: https://www.jfrog.com/confluence/display/RTF/Deploying+Snapshots+to+oss.jfrog.org

Artifactory plugin JFrog help: https://www.jfrog.com/confluence/display/RTF/Gradle+Artifactory+Plugin

Source for how we interact with Bintray Gradle plugin: https://github.com/Cognifide/gradle-aem-plugin/blob/master/gradle/publish.gradle.kts

tMaxx commented 5 years ago

Ticket for the only outstanding bug in knotx-gradle-plugins: Knotx/knotx-gradle-plugins#5

Some more testing will need to be done after above is fixed, including verifying multi-artifact projects (composite projects). The only tests that I have done have been with knotx-junit5 as a testing ground.

julian-alarcon commented 3 years ago

You should reconsider this https://jfrog.com/blog/into-the-sunset-bintray-jcenter-gocenter-and-chartcenter/