Skip to content

Latest commit

 

History

History
81 lines (67 loc) · 2.44 KB

File metadata and controls

81 lines (67 loc) · 2.44 KB

Releasing to Maven Central Repository

This package is released to Maven Central Repository by using Maven with the central-publishing-maven-plugin.

This process has been tested with OpenJDK 17.0.17 and Maven 3.9.12.

This is released under the org.fanout group ID, which is maintained by Fastly.

Credentials

This package is published to Maven Central using a User Token under a Maven Central Repository account.

GPG key

Publishing requires you to prove your identity using GPG. Create a GPG keypair for the email associated with your Maven Central Repository account.

Once you have published your GPG public key, note its key name and passphrase.

Configure Maven

You will need copy ./.mvn/settings.example.xml to ./.mvn/settings.xml, and fill in the following using the User Token credentials and your GPG keyname and passphrase. Do not commit this file to source control.

<settings>
    <servers>
        <server>
            <id>central</id>
            <!-- Note: these are for the User Token, not the Maven Central Repository login -->
            <username>**USERNAME**</username>
            <password>**PASSWORD**</password>
        </server>
    </servers>
    <profiles>
        <profile>
            <id>central</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <properties>
                <gpg.keyName>**KEYNAME**</gpg.keyName>
                <gpg.passphrase>**PASSPHRASE**</gpg.passphrase>
            </properties>
        </profile>
    </profiles>
</settings>

Release

The following steps should be taken on each release.

  1. Update docs + version
    • Update README.md / CHANGELOG.md
    • Bump <version> in pom.xml
    • Commit (replace 1.0.0 below with the version you're releasing)
      git commit -m "Release 1.0.0"
  2. Tag the release
    • Create a tag
      git tag v1.0.0
  3. Push commit + tag
    git push
    git push --tags
  4. Validate that tests pass, everything builds, sources/javadoc are valid, and GPG signing works.
    mvn clean verify
  5. Release to Maven using the commands:
    mvn clean deploy
  6. Complete publishing.