Accepted
Java library consumers expect artifacts to be available on Maven Central — the de facto standard repository. Pre-release snapshot consumers need a stable snapshot repository. The SDK also needed GPG signing for Central compliance and source + Javadoc JAR attachment for IDE integration.
Use central-publishing-maven-plugin (org.sonatype.central, v0.8.0) targeting the Sonatype Central Portal (publishingServerId: central). The release pipeline:
maven-release-pluginmanages version bumps, tagging, and release commits.maven-source-pluginattaches sources JAR (-sources.jar).maven-javadoc-pluginattaches Javadoc JAR (-javadoc.jar).maven-gpg-pluginsigns all artifacts in theverifyphase.central-publishing-maven-pluginpublishes the signed bundle to Maven Central.
Pre-release snapshots go to https://oss.sonatype.org/content/repositories/snapshots/. jitpack.io is also supported as an alternative snapshot source.
- Enables: Standard Maven/Gradle dependency coordinates (
com.contentful.java:cma-sdk:X.Y.Z); IDE source navigation via sources JAR; Javadoc in IDE tooltips. - Requires: GPG key available in the CI/release environment; Sonatype Central credentials configured as Maven server settings.
- Release branch pattern: Releases use
release/X.Y.Zbranches with[maven-release-plugin]commits visible in git history. - Jitpack fallback:
jitpack.ymlat the repo root enables snapshot builds from any branch via jitpack.io.