NASA-AMMOS / aerie

A software framework for modeling spacecraft.
https://nasa-ammos.github.io/aerie-docs/
MIT License
68 stars 19 forks source link

Add Aerie Maven artifacts to Maven Central #563

Open camargo opened 1 year ago

camargo commented 1 year ago

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.

skovati commented 1 year ago

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.

bradNASA commented 1 year ago

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/

skovati commented 12 months ago

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.

ewferg commented 12 months ago

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 commented 11 months ago

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

dandelany commented 10 months ago

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.

skovati commented 8 months ago

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:

skovati commented 7 months ago

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

dandelany commented 4 months ago

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.