Update deployment from OSSRH#372
Conversation
|
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. WalkthroughAdds CI workflows for release and website publishing, updates build workflow and Maven settings, removes the legacy website deployment script, modernizes pom.xml for Central publishing and Java 21 in CI, and updates README release instructions. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor Dev
participant GitHub as GitHub
participant GA as GitHub Actions
participant Maven as Maven (Release)
participant GPG as GPG
Dev->>GitHub: Push tag release*
GitHub-->>GA: Trigger Release workflow
GA->>GA: Checkout, set Git, setup Java 21, write .mvn/maven.config
GA->>Maven: mvn clean install
GA->>GPG: Use GPG secrets to sign artifacts
GA->>Maven: mvn release:clean release:prepare release:perform (Central creds)
GA->>GitHub: Tag websiterelease and push
GA->>GitHub: Delete triggering release tag (local + remote)
sequenceDiagram
autonumber
participant GitHub as GitHub
participant GA as GitHub Actions
participant Site as threeten.github.io
GitHub-->>GA: Trigger Website workflow on tag website*
GA->>GA: Checkout, setup Java 21, write .mvn/maven.config
GA->>GA: mvn install site
GA->>Site: Checkout threeten.github.io into target/
GA->>Site: Replace threeten-extra/ with built site, commit, push
GA->>GitHub: Delete triggering website tag (local + remote)
sequenceDiagram
autonumber
participant GitHub as GitHub
participant GA as GitHub Actions
participant Build as Maven Build
GitHub-->>GA: Trigger Build (push/pr/schedule)
GA->>GA: Checkout@v4, setup-java@v4 (Java 8/11/21), cache maven
GA->>Build: mvn verify using .github/maven-settings.xml
GA->>GA: CodeQL init/analyze @v3
Estimated code review effort🎯 4 (Complex) | ⏱️ ~35 minutes Poem
Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. ✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Pull Request Overview
This PR migrates the project's deployment infrastructure from the deprecated OSSRH (OSS Repository Hosting) to Maven Central's new direct publishing system and reorganizes CI/CD workflows.
- Replaces OSSRH deployment configuration with Maven Central's publishing plugin
- Separates build, release, and website workflows into dedicated GitHub Actions files
- Updates Maven plugins and dependencies to latest versions
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| pom.xml | Removes OSSRH distribution management, adds Central publishing plugin, updates dependencies and plugin versions |
| README.md | Updates release process documentation to reflect new GitHub Actions workflow |
| .github/workflows/website.yml | New dedicated workflow for website deployment triggered by website tags |
| .github/workflows/release.yml | New dedicated workflow for releases triggered by release tags |
| .github/workflows/build.yml | Removes release/website logic, focuses only on CI builds and testing |
| .github/website.sh | Removes legacy shell script replaced by GitHub Actions workflow |
| .github/maven-settings.xml | Updates server configuration for Central publishing and GitHub authentication |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.
|
|
||
| git add -A | ||
| git status | ||
| git commit --message "Update threeten-extra from CI: $GITHUB_ACTION" |
There was a problem hiding this comment.
The variable $GITHUB_ACTION is incorrect and will likely be empty or undefined. Use $GITHUB_RUN_ID, $GITHUB_RUN_NUMBER, or $GITHUB_SHA instead for a meaningful commit message.
| git commit --message "Update threeten-extra from CI: $GITHUB_ACTION" | |
| git commit --message "Update threeten-extra from CI: $GITHUB_RUN_ID" |
| <maven-javadoc-plugin.version>3.11.2</maven-javadoc-plugin.version> | ||
| <maven-jxr-plugin.version>3.6.0</maven-jxr-plugin.version> | ||
| <maven-plugin-plugin.version>3.15.1</maven-plugin-plugin.version> | ||
| <maven-pmd-plugin.version>3.24.0</maven-pmd-plugin.version><!-- 3.25.0/3.26.0 throws NoSuchMethodException --> |
There was a problem hiding this comment.
The comment about versions 3.25.0/3.26.0 throwing NoSuchMethodException should include more context about the specific issue or a reference to track when this can be resolved.
| <maven-pmd-plugin.version>3.24.0</maven-pmd-plugin.version><!-- 3.25.0/3.26.0 throws NoSuchMethodException --> | |
| <maven-pmd-plugin.version>3.24.0</maven-pmd-plugin.version><!-- 3.25.0/3.26.0 throw NoSuchMethodException due to https://github.com/apache/maven-pmd-plugin/issues/196 --> |
| <maven-jxr-plugin.version>3.6.0</maven-jxr-plugin.version> | ||
| <maven-plugin-plugin.version>3.15.1</maven-plugin-plugin.version> | ||
| <maven-pmd-plugin.version>3.24.0</maven-pmd-plugin.version><!-- 3.25.0/3.26.0 throws NoSuchMethodException --> | ||
| <maven-project-info-reports-plugin.version>3.6.2</maven-project-info-reports-plugin.version><!-- 3.7.0/3.8.0 has error --> |
There was a problem hiding this comment.
The comment about versions 3.7.0/3.8.0 having an error should specify what type of error occurs and include a reference for tracking when this can be resolved.
| <maven-project-info-reports-plugin.version>3.6.2</maven-project-info-reports-plugin.version><!-- 3.7.0/3.8.0 has error --> | |
| <maven-project-info-reports-plugin.version>3.6.2</maven-project-info-reports-plugin.version><!-- 3.7.0/3.8.0 fails with java.lang.NoSuchMethodError; see https://github.com/apache/maven-project-info-reports-plugin/issues/222 --> |
| <!-- Other plugins --> | ||
| <github-api.version>1.321</github-api.version> | ||
| <github-release-plugin.version>1.4.0</github-release-plugin.version> | ||
| <maven-site-plugin.version>3.12.1</maven-site-plugin.version><!-- 3.20.0/3.21.0 throws ComponentLookupException --> |
There was a problem hiding this comment.
The comment about versions 3.20.0/3.21.0 throwing ComponentLookupException should include more details about the specific issue and when it might be resolved.
| <maven-site-plugin.version>3.12.1</maven-site-plugin.version><!-- 3.20.0/3.21.0 throws ComponentLookupException --> | |
| <maven-site-plugin.version>3.12.1</maven-site-plugin.version><!-- 3.20.0/3.21.0 throw ComponentLookupException due to incompatibility with Maven core; see https://issues.apache.org/jira/browse/MSITE-963. Issue is tracked upstream and may be resolved in a future release. --> |
OSSRH is dead, use replacement Update build to use separate workflows
There was a problem hiding this comment.
Actionable comments posted: 4
♻️ Duplicate comments (3)
.github/workflows/website.yml (1)
69-69: Good call using GITHUB_RUN_ID in the commit messageThis addresses the earlier concern about using a more meaningful/run-specific identifier.
pom.xml (2)
955-956: Add references to known upstream issues in version commentsAdding links makes the rationale future-proof and self-documenting.
- <maven-pmd-plugin.version>3.24.0</maven-pmd-plugin.version><!-- 3.25.0/3.26.0 throws NoSuchMethodException --> + <maven-pmd-plugin.version>3.24.0</maven-pmd-plugin.version><!-- 3.25.0/3.26.0 throw NoSuchMethodException due to https://github.com/apache/maven-pmd-plugin/issues/196 --> - <maven-project-info-reports-plugin.version>3.6.2</maven-project-info-reports-plugin.version><!-- 3.7.0/3.8.0 has error --> + <maven-project-info-reports-plugin.version>3.6.2</maven-project-info-reports-plugin.version><!-- 3.7.0/3.8.0 fails with java.lang.NoSuchMethodError; see https://github.com/apache/maven-project-info-reports-plugin/issues/222 -->
960-961: Clarify the site plugin comment with the upstream issue- <maven-site-plugin.version>3.12.1</maven-site-plugin.version><!-- 3.20.0/3.21.0 throws ComponentLookupException --> + <maven-site-plugin.version>3.12.1</maven-site-plugin.version><!-- 3.20.0/3.21.0 throw ComponentLookupException; see https://issues.apache.org/jira/browse/MSITE-963 -->
🧹 Nitpick comments (4)
.github/workflows/website.yml (1)
63-63: Remove trailing spaces flagged by YAML lintersThere are trailing spaces on Lines 63, 66, and 70. While harmless to execution, they cause lint failures.
Also applies to: 66-66, 70-70
.github/workflows/build.yml (2)
24-24: Remove trailing whitespaceTrailing space on Line 24 is flagged by linting.
55-58: Optionally build the site once to reduce CI timeRunning
mvn install sitefor all JDKs duplicates effort. Consider runningsiteonly on one JDK (e.g., 11) and usinginstall -DskipTestson others.Example:
- - name: Maven build - run: | - mvn install site + - name: Maven build (JDK 11) + if: matrix.java == '11' + run: | + mvn install site + + - name: Maven build (other JDKs) + if: matrix.java != '11' + run: | + mvn -DskipTests installpom.xml (1)
965-967: Pinned versions for central publishing and GitHub pluginsVersions look reasonable for stability. Consider periodic review to pick up fixes/features.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (7)
-
.github/maven-settings.xml(1 hunks) -
.github/website.sh(0 hunks) -
.github/workflows/build.yml(2 hunks) -
.github/workflows/release.yml(1 hunks) -
.github/workflows/website.yml(1 hunks) -
README.md(1 hunks) -
pom.xml(4 hunks)
💤 Files with no reviewable changes (1)
- .github/website.sh
🚧 Files skipped from review as they are similar to previous changes (3)
- .github/maven-settings.xml
- .github/workflows/release.yml
- README.md
🧰 Additional context used
🪛 YAMLlint (1.37.1)
.github/workflows/website.yml
[warning] 15-15: wrong indentation: expected 6 but found 4
(indentation)
[error] 63-63: trailing spaces
(trailing-spaces)
[error] 66-66: trailing spaces
(trailing-spaces)
[error] 70-70: trailing spaces
(trailing-spaces)
.github/workflows/build.yml
[error] 24-24: trailing spaces
(trailing-spaces)
[warning] 26-26: wrong indentation: expected 6 but found 4
(indentation)
🔇 Additional comments (5)
.github/workflows/website.yml (1)
73-77: Delete website tag step — OK (credentials look fine)Short explanation:
git remote -vshows the plain HTTPS URL (no embedded token). That's expected — actions/checkout normally authenticates via an HTTP extraheader (not by embedding the token in the remote URL). Withpersist-credentialsdefaulting totrue, thegit push --deleteshould succeed.Points to check:
- .github/workflows/website.yml — lines 73–77 (Delete website tag step)
If you want to be explicit:
- Set
persist-credentials: trueon the initialactions/checkout.- Or verify the auth header is present:
git config --get-all http.https://github.com/.extraheader(orgit config --get-all http.extraheader).pom.xml (4)
641-641: PMD targetJdk now tied to compiler.release – good alignmentUsing
${maven.compiler.release}keeps PMD in sync with the effective bytecode level.
828-840: GitHub Actions profile for GPG signer set to BouncyCastleLooks good. Ensure the maven-gpg-plugin picks this up in CI and that the required provider is available (the plugin handles BC internally when configured).
If needed, verify effective settings and that signing works in CI by checking for
gpg.signer=bcin the build logs during a-Doss.reporun.
935-938: Publishing control properties look sensible for CI
joda.publish.auto=truewithwaitUntil=validatedaligns with an automated but safe central publishing flow.
885-897: publishingServerId ('central-publish') matches settings — no action neededFound central-publish in pom.xml (around lines 892–893) and a corresponding central-publish entry in .github/maven-settings.xml with username/password set to ${env.MAVEN_CENTRAL_USERNAME} / ${env.MAVEN_CENTRAL_PASSWORD}.
| java: [8, 11, 21] | ||
|
|
||
| steps: | ||
| - name: Checkout |
There was a problem hiding this comment.
🛠️ Refactor suggestion
Fix YAML indentation for step list items under steps:
Same as the website workflow: list items should be indented relative to steps:. Indentation misalignment can cause parsing errors.
- steps:
- - name: Checkout
+ steps:
+ - name: CheckoutApply the two-space indent to all steps (Lines 26, 29, 36, 49, 55, 59 blocks).
Also applies to: 29-29, 36-36, 49-49, 55-55, 59-59
🧰 Tools
🪛 YAMLlint (1.37.1)
[warning] 26-26: wrong indentation: expected 6 but found 4
(indentation)
🤖 Prompt for AI Agents
In .github/workflows/build.yml around lines 26, 29, 36, 49, 55, and 59 the YAML
step entries under the steps: key are misaligned; fix by indenting each step
list item two spaces relative to the steps: key (ensure the leading hyphen and
the entire block for each step are shifted to be two spaces in from the steps:
line), and apply this two-space indentation consistently for the blocks starting
at the listed lines so the workflow parses correctly.
| build: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout |
There was a problem hiding this comment.
🛠️ Refactor suggestion
Fix YAML indentation for all step list items under steps:
List items must be indented relative to the steps: key. Currently they are aligned at the same indentation level, which can break workflow parsing. Indent each - name: (and any other list items beneath steps:) by two spaces.
Apply this pattern throughout the steps section (example shown for the first entry):
- steps:
- - name: Checkout
+ steps:
+ - name: CheckoutRepeat the extra two-space indent for every step starting at Lines 15, 27, 34, 47, 51, 59, and 73 blocks.
Also applies to: 25-25, 34-34, 47-47, 51-51, 59-59, 73-73
🧰 Tools
🪛 YAMLlint (1.37.1)
[warning] 15-15: wrong indentation: expected 6 but found 4
(indentation)
🤖 Prompt for AI Agents
In .github/workflows/website.yml around lines 15, 25, 34, 47, 51, 59, and 73,
several step list items under the steps: key are not indented properly (they are
aligned with the key); fix each by adding two spaces before every "- name:" and
any other "-" list item within the steps block so they are nested under steps:,
and apply the same two-space indentation correction for the blocks covering
lines 15-15, 25-25, 34-34, 47-47, 51-51, 59-59, and 73-73 to ensure valid YAML
parsing.
|
|
||
| rm -rf threeten-extra/ | ||
| cp -R ../site threeten-extra/ | ||
|
|
There was a problem hiding this comment.
Copying the site into threeten-extra/ creates an extra nested site folder
cp -R ../site threeten-extra/ results in threeten-extra/site/.... The website likely expects content at threeten-extra/index.html (not threeten-extra/site/index.html). Copy the contents of site/ instead.
- rm -rf threeten-extra/
- cp -R ../site threeten-extra/
+ rm -rf threeten-extra/
+ mkdir -p threeten-extra
+ cp -a ../site/. threeten-extra/📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| rm -rf threeten-extra/ | |
| cp -R ../site threeten-extra/ | |
| rm -rf threeten-extra/ | |
| mkdir -p threeten-extra | |
| cp -a ../site/. threeten-extra/ | |
🧰 Tools
🪛 YAMLlint (1.37.1)
[error] 63-63: trailing spaces
(trailing-spaces)
[error] 66-66: trailing spaces
(trailing-spaces)
🤖 Prompt for AI Agents
.github/workflows/website.yml around lines 63 to 66: the current command copies
the site directory itself so you end up with threeten-extra/site/... instead of
placing the site contents at threeten-extra/. Change the copy to copy the
contents of ../site into threeten-extra (for example use cp -R ../site/.
threeten-extra/ or cp -R ../site/* threeten-extra/) so index.html and other
files land directly in threeten-extra/.
| git add -A | ||
| git status | ||
| git commit --message "Update threeten-extra from CI: $GITHUB_RUN_ID" | ||
|
|
||
| git push origin main |
There was a problem hiding this comment.
🛠️ Refactor suggestion
Guard the commit/push to avoid failing when there are no changes
If there’s nothing to commit, git commit exits with a non-zero status and fails the job. Guard the commit and push.
- git add -A
- git status
- git commit --message "Update threeten-extra from CI: $GITHUB_RUN_ID"
-
- git push origin main
+ git add -A
+ git status
+ if ! git diff --cached --quiet; then
+ git commit --message "Update threeten-extra from CI: $GITHUB_RUN_ID"
+ git push origin main
+ else
+ echo "No website changes to publish"
+ fi📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| git add -A | |
| git status | |
| git commit --message "Update threeten-extra from CI: $GITHUB_RUN_ID" | |
| git push origin main | |
| git add -A | |
| git status | |
| if ! git diff --cached --quiet; then | |
| git commit --message "Update threeten-extra from CI: $GITHUB_RUN_ID" | |
| git push origin main | |
| else | |
| echo "No website changes to publish" | |
| fi |
🧰 Tools
🪛 YAMLlint (1.37.1)
[error] 70-70: trailing spaces
(trailing-spaces)
🤖 Prompt for AI Agents
In .github/workflows/website.yml around lines 67 to 71, the workflow runs git
commit and git push unconditionally which will fail the job when there are no
staged changes; modify the steps to stage files, then check for staged changes
(e.g., use git diff --cached --quiet or git status --porcelain) and only run git
commit and git push when changes exist, otherwise skip those commands (ensure
the check returns success so the job continues and do not run git push if no
commit was made).
OSSRH is dead, use replacement
Update build to use separate workflows
Summary by CodeRabbit
New Features
Dependencies
Chores
Documentation