User guide available on posthog.com/docs/integrate/server/java.
We're using Sonatype OSSRH to host our open source project binaries. Docs: https://central.sonatype.org/publish/publish-guide/
- First create an account to access JIRA and later the repository manager https://issues.sonatype.org/secure/Signup!default.jspa
- Create a ticket similar to https://issues.sonatype.org/browse/OSSRH-59076 & get one of the people who already have access to comment on the request with approval (you can ask in #team-platform channel).
- Create a gpg key and distribute your public key, see docs here: https://central.sonatype.org/publish/requirements/gpg/ (we will need the passphase to be specified in the settings file below).
- Create a
~/.m2/settings.xml
file with this content (replace the capitalized terms)
<settings>
<servers>
<server>
<id>ossrh</id>
<username>YOUR_SONATYPE_USERNAME</username>
<password>YOUR_SONATYPE_PASSWORD</password>
</server>
</servers>
<profiles>
<profile>
<id>ossrh</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<gpg.executable>gpg</gpg.executable>
<gpg.passphrase>GPG_PASSPHASE</gpg.passphrase>
</properties>
</profile>
</profiles>
</settings>
- Change the version in
posthog/pom.xml
accordingly (latest versions can be found here: https://search.maven.org/search?q=com.posthog.java) - Run
mvn deploy
inposthog-java/posthog
folder.
- In https://oss.sonatype.org/#stagingRepositories you should see your just pushed files. Click "Close" and check the activity tab to make sure all validations passed (wait and refresh).
- After all validations passed the Release button will become available to publish the new version.