Link Search Menu Expand Document

Developer Guide for publishing to maven

Manual Publishing

  1. Get account details to login to
  2. Install GPG, setup keys, and export to a key server ``` $ gpg –gen-key … Real name: Central Repo Test Email address: You selected this USER-ID: “Central Repo Test

Change (N)ame, (E)mail, or (O)kay/(Q)uit? O … $ gpg –list-keys /home/mylocaluser/.gnupg/pubring.kbx ——————————— pub rsa3072 2021-06-23 [SC] [expires: 2023-06-23] CA925CD6C9E8D064FF05B4728190C4130ABA0F98 uid [ultimate] Central Repo Test sub rsa3072 2021-06-23 [E] [expires: 2023-06-23] $ gpg –keyserver –recv-keys CA925CD6C9E8D064FF05B4728190C4130ABA0F98

if failing to programmatically export to key server, you can export it manually and upload to via `submit key`

run the following command to generated the ASCII-armored public key needed by the key server

gpg –armor –export user-id > pubkey.asc

3. Setup your credentials locally at `$HOME/.sbt/0.13/sonatype.sbt`

credentials += Credentials(“Sonatype Nexus Repository Manager”, “”, “(Sonatype user name)”, “(Sonatype password)”)


4. Publish to maven via sbt
In your feathr directory, clear your cache to prevent stale errors

rm -rf target/sonatype-staging/

Start sbt console by running

sbt -java-home /Library/Java/JavaVirtualMachines/jdk1.8.0_282-msft.jdk/Contents/Home

Execute command in sbt console to publish to maven

reload ; publishSigned; sonatypeBundleRelease ```

  1. “Upon release, your component will be published to Central: this typically occurs within 30 minutes, though updates to search can take up to four hours.”

  2. After new version is released via Maven, use the released version to run a test to ensure it actually works. You can do this by running a codebase that imports Feathr scala code.

CI Automatic Publishing