Skip to content

Simplify Sonatype Maven repository authentication#9

Merged
ksletmoe merged 1 commit into
mainlinefrom
claude/publish-maven-snapshot-vf41b
Mar 15, 2026
Merged

Simplify Sonatype Maven repository authentication#9
ksletmoe merged 1 commit into
mainlinefrom
claude/publish-maven-snapshot-vf41b

Conversation

@ksletmoe

Copy link
Copy Markdown
Owner

Summary

Simplified the authentication mechanism for the Sonatype Maven Central Portal snapshots repository by switching from custom HTTP header-based authentication to standard Maven credentials.

Key Changes

  • Removed Base64 import that was only used for manual token encoding
  • Replaced custom HttpHeaderCredentials with standard Maven credentials block
  • Changed from Bearer token authentication to basic username/password authentication
  • Removed explicit HttpHeaderAuthentication configuration
  • Credentials now use sonatypeUsername and sonatypePassword properties directly

Implementation Details

The authentication now leverages Maven's built-in credential handling instead of manually constructing Base64-encoded Bearer tokens. This approach is simpler, more maintainable, and aligns with standard Maven repository authentication practices. The credentials are still sourced from the same sonatypeUsername and sonatypePassword properties.

https://claude.ai/code/session_0185eQCsjR2uRsGWn2JpU9Xr

The Central Portal snapshot repository (maven-snapshots) uses standard
basic authentication (username/password), not Bearer token auth. Bearer
is for the Portal API and OSSRH Staging API, but the snapshot repo is a
standard Maven repository.

https://claude.ai/code/session_0185eQCsjR2uRsGWn2JpU9Xr
@ksletmoe ksletmoe merged commit 8d0c4fb into mainline Mar 15, 2026
2 checks passed
@ksletmoe ksletmoe deleted the claude/publish-maven-snapshot-vf41b branch March 15, 2026 06:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants