Conversation
- 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.
There was a problem hiding this comment.
💡 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
| # 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[@]}" |
There was a problem hiding this comment.
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 👍 / 👎.
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?
-soption removed).CENTRAL_USERNAME,CENTRAL_PASSWORD) for secure deployments via environment variables.BREAKING
CENTRAL_USERNAMEandCENTRAL_PASSWORDenvironment variables to be set.Review focus
Checklist