Skip to content

Conversation

@tcheeric
Copy link
Owner

Summary

Prepared Maven configuration for publishing artifacts to Sonatype Central. Added environment-based credentials, adjusted commands for consistency, and ensured proper repository settings are utilized.

What changed?

  • Updated Maven release scripts to avoid overriding default configurations (-s option removed).
  • Introduced Sonatype Central server credentials (CENTRAL_USERNAME, CENTRAL_PASSWORD) for secure deployments via environment variables.
  • CI updates to ensure custom Maven settings file is being used during builds.

BREAKING

⚠️ BREAKING: Publishing to Sonatype Central requires CENTRAL_USERNAME and CENTRAL_PASSWORD environment variables to be set.

Review focus

  • Verify Maven command compatibility with CI updates.
  • Confirm proper environment variable handling for credentials.

Checklist

  • Scope ≤ 300 lines (or split/stack)
  • Title is verb + object (e.g., “Refactor auth middleware to async”)
  • Description links the issue and answers “why now?”
  • BREAKING flagged if needed
  • Tests/docs updated (if relevant)

- Modify the release script to use the default settings provided by
  actions/setup-java when publishing to the central repository.
  This change ensures that the correct settings are applied without
  overriding them with the -s option.
@tcheeric tcheeric merged commit 9262ca7 into main Oct 14, 2025
4 checks passed
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting

Comment on lines +136 to +140
# For Central publishing, prefer the settings provided by actions/setup-java (no -s override)
if [[ "$profile" == "release-central" ]]; then
run_cmd mvn "${mvn_args[@]}"
else
run_cmd mvn $MVN_SETTINGS_OPTS "${mvn_args[@]}"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Restore fallback to project settings for local central publish

The new branch that skips MVN_SETTINGS_OPTS for the release-central profile causes scripts/release.sh publish --repo central to ignore .mvn/settings.xml. That file now contains the repository and server credentials driven by CENTRAL_USERNAME/CENTRAL_PASSWORD, so on a developer machine (where actions/setup-java is not writing ~/.m2/settings.xml) the command runs without any server configuration and the deploy will fail with a 401/missing repository. Consider only skipping -s .mvn/settings.xml when a CI‑provided settings file is present, otherwise retain the previous behaviour so local releases continue to work.

Useful? React with 👍 / 👎.

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