aerie icon indicating copy to clipboard operation
aerie copied to clipboard

Add Aerie Maven artifacts to Maven Central

Open camargo opened this issue 3 years ago • 9 comments

See: https://maven.apache.org/repository/guide-central-repository-upload.html

This would help decrease the barrier to entry a bit since right now you need a GitHub account to use the Aerie Maven GitHub packages.

camargo avatar Dec 28 '22 19:12 camargo

Unfortunately, publishing to Maven Central is quite a can of worms. Maven Central simply acts as a centralized reverse proxy, and packages synced to Maven Central must actually be hosted on some third-party repo like Sonatype's OSSRH. This requires requesting an account through their Jira, creating and publishing a PGP key, signing binaries, and then manually syncing them to Maven Central.

Since the goal of this ticket is to just have publicly accessible maven packages, I looked into making our Github maven packages public. Unfortunately, this isn't supported first class by Github, (see this long-running discussion for details), but a workaround exists where you simply create a PAT that has read-only access to an organizations packages, and publish this publicly for those who want to consume your packages. Since public packages are 100% free according to Github's pricing page, this is a decent option while we wait for Github to natively support downloading public packages sans auth.

skovati avatar May 18 '23 18:05 skovati

I have to create a new personal access token occasionally even though they seem fine and haven't expired. I vote for maven central. Here's some links for manually and automatically pushing jars. https://stackoverflow.com/questions/28846802/how-to-manually-publish-jar-to-maven-central https://www.albertgao.xyz/2018/01/18/how-to-publish-artifact-to-maven-central-via-gradle/

bradNASA avatar Aug 25 '23 00:08 bradNASA

Looking into this further, I discovered that publishing to Maven Central requires you to have DNS records on the domain these Maven packages are namespaced to e.g. gov.nasa.jpl.aerie..., which means we would have to create a public facing website at aerie.jpl.nasa.gov. If this is high enough priority to warrant creating public DNS records under nasa.gov, we can move forward with this.

skovati avatar Oct 10 '23 19:10 skovati

As a note, I am currently speaking with the web admin of ammos.nasa.gov to see if we can add an aerie.ammos.nasa.gov subdomain. If we can do this, I think that namespace is cleaner since we are intended Aerie to be for all of NASA.

ewferg avatar Oct 11 '23 05:10 ewferg

aerie.ammos.nasa.gov is online and has a DNS record. Hopefully this unblocks us here.

ewferg avatar Oct 20 '23 22:10 ewferg

Per @skovati we have the subdomain but there is some question about whether we are able to use it for Maven or whether it should be hosted somewhere else - more investigation needed.

dandelany avatar Dec 07 '23 18:12 dandelany

I've confirmed that we are able to host DNS TXT records under ammos.nasa.gov, which will allow us to publish packages under that namespace, e.g. gov.nasa.ammos.aerie.contrib.*. This, of course, will require a rename of all aerie java packages, but it should be as simple as s/gov.nasa.jpl.aerie/gov.nasa.ammos.aerie/.

I created a ticket on Sonatype for our publishing account, but it looks like they are in the process of moving their account / namespace creation to a new (non-Jira based) system.

https://central.sonatype.org/news/20240109_issues_sonatype_org_deprecation/

Because of this, signups using the legacy flow are paused. We'll need to wait until Feb 1st to create an account using the new central portal.

Steps following account creation are:

  • Claim namespace under ammos.nasa.gov using DNS TXT records.
  • Update aerie CI/CD to publish to Maven Central

skovati avatar Jan 18 '24 17:01 skovati

Chatted with @jpl-jengelke about publishing under gov.nasa.ammos.aerie.*, since AMMOS has already claimed ownership of this top level domain (gov.nasa.ammos) with Sonatype (Maven Central publisher). Related to https://github.com/NASA-AMMOS/slim-starterkit-java/pull/5

skovati avatar Feb 15 '24 18:02 skovati

This should no longer be blocked & we have the ability to publish packages to gov.nasa.ammos.aerie.*.

We need to test this process to make sure it works, but be careful to do so in a way that does not break things/expose an incorrect build to any consumers.

dandelany avatar May 23 '24 18:05 dandelany