The Java SDK publishes through the current Maven Central Portal flow. The
release workflow uses Sonatype's central-publishing-maven-plugin, signs the
release artifacts, and can auto-publish after Central Portal validation.
The release Maven profile attaches the artifacts Maven Central expects:
- Main jar
- Sources jar
- Javadocs jar
- POM metadata
- GPG signatures
- Central Portal deployment bundle
Configure these repository secrets in
autohandai/code-agent-sdk-java -> Settings -> Secrets and variables -> Actions:
CENTRAL_USERNAME: Sonatype Central Portal user-token username.CENTRAL_PASSWORD: Sonatype Central Portal user-token password.MAVEN_GPG_PRIVATE_KEY: ASCII-armored private GPG key.MAVEN_GPG_PASSPHRASE: Passphrase for the GPG key.
The workflow writes no credentials into the repository. actions/setup-java
creates a temporary Maven settings.xml with server id central and imports the
GPG key only for the release job.
Before the first Maven Central release:
- Create or use the Sonatype Central Portal account for Autohand.
- Verify the
ai.autohandnamespace in Central Portal. - Generate a Central Portal user token.
- Add the GitHub secrets above.
- Publish a GitHub release tag such as
v1.0.0.
Create a GitHub release:
git tag v1.0.0
git push origin v1.0.0
gh release create v1.0.0 --title "Java SDK v1.0.0" --notes "Initial Maven Central release."The release workflow will:
- Resolve
v1.0.0to Maven version1.0.0. - Run
mvn verify. - Compile every example with
scripts/validate-examples.sh. - Run
mvn -P release deploy. - Upload to Maven Central Portal.
- Auto-publish and wait until Central reports the deployment as published.
You can also start the workflow manually from GitHub Actions and choose whether to auto-publish. When auto-publish is disabled, Central Portal validates the deployment and waits for a maintainer to publish it in the web UI.
After the first release is published to Maven Central:
<dependency>
<groupId>ai.autohand</groupId>
<artifactId>code-agent-sdk-java</artifactId>
<version>1.0.0</version>
</dependency>Maven Central propagation can take a few minutes after publication.