Skip to content

Comments

Migrate from Legacy OSSRH to Central Portal#2255

Merged
ihrasko merged 5 commits intoPANTHEONtech:21.xfrom
ihrasko:21.x-central-deploy
Jul 21, 2025
Merged

Migrate from Legacy OSSRH to Central Portal#2255
ihrasko merged 5 commits intoPANTHEONtech:21.xfrom
ihrasko:21.x-central-deploy

Conversation

@ihrasko
Copy link
Collaborator

@ihrasko ihrasko commented Jul 11, 2025

ihrasko added 2 commits July 11, 2025 14:20
OSSRH is going down. We are going to use Maven plugin to deploy
to Central Portal:
https://central.sonatype.org/publish/publish-portal-maven/

JIRA: LIGHTY-370
Signed-off-by: Ivan Hrasko <[email protected]>
(cherry picked from commit afa9255)
Use central-publishing-maven-plugin to mvn deploy artifacts during
release profile invocation (mvn release:perform).

See:
https://central.sonatype.org/publish/publish-portal-maven/

JIRA: LIGHTY-370
Signed-off-by: Ivan Hrasko <[email protected]>
(cherry picked from commit 0005e23)
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Summary of Changes

Hello @ihrasko, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request focuses on modernizing the project's Maven publication process by migrating from the legacy OSSRH system to the new Central Portal. This significant change ensures compliance with current Maven Central requirements, improves build configuration, and updates key dependencies, streamlining the release workflow for future artifact deployments.

Highlights

  • Maven Central Migration: The project's build configuration has been updated to migrate from the legacy OSSRH (Open Source Software Repository Hosting) system to the new Central Portal for publishing artifacts to Maven Central. This involves replacing the old distributionManagement setup with the central-publishing-maven-plugin in the release profiles of key parent POMs.
  • POM Metadata Enrichment: Numerous pom.xml files across various modules (applications, examples, models, modules, tests) have been updated to include the <name> and <url> elements. This is a standard requirement for projects published to Maven Central, providing essential metadata for consumers.
  • Parent POM RelativePath Fixes: Several child pom.xml files have had their <relativePath> for parent POMs updated to explicitly include pom.xml (e.g., ../lighty-parent changed to ../lighty-parent/pom.xml). This ensures more robust and explicit parent POM resolution within the multi-module build.
  • Dependency Upgrade: The spring-boot-dependencies version in lighty-core/lighty-controller-spring-di/pom.xml has been upgraded from 3.3.13 to 3.5.3, bringing in newer Spring Boot features and fixes.
  • Artifact Exclusion Configuration: The central-publishing-maven-plugin in lighty-core/lighty-minimal-parent/pom.xml has been configured with an extensive excludeArtifacts list. This ensures that specific aggregator, test, and example application modules, which are not intended for public consumption, are not published to Maven Central.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@Tobianas Tobianas left a comment

Choose a reason for hiding this comment

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

Failing build

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request migrates the project's deployment from the legacy Sonatype OSSRH to the new Maven Central Portal. The changes include removing the old distributionManagement configuration, adding the central-publishing-maven-plugin, and updating project POMs with required metadata like <name> and <url>. There's an invalid version for spring-boot-dependencies that has been introduced, which will break the build, and the maven.compiler.release property has been removed from a parent POM, which could lead to build inconsistencies across different environments.

@ihrasko ihrasko marked this pull request as draft July 11, 2025 12:35
ihrasko added 3 commits July 21, 2025 09:54
Fix relative paths to POM parents as a root cause of Central Portal
validation errors for some artifacts (exactly 26).

Those artifacts should inherit SCM name and url from its parent
when properly configured.

JIRA: LIGHTY-374
Signed-off-by: Ivan Hrasko <[email protected]>
(cherry picked from commit 4f6ca0c)
Add missing SCM name and url to some artifacts.

JIRA: LIGHTY-374
Signed-off-by: Ivan Hrasko <[email protected]>
(cherry picked from commit 9930c6a)
Exclude skipped 25 artifacts by maven.deploy.skip from publishing
to maven central.

JIRA: LIGHTY-374
Signed-off-by: Ivan Hrasko <[email protected]>
(cherry picked from commit ef38520)
@ihrasko ihrasko force-pushed the 21.x-central-deploy branch from 512cd1d to dfba5dc Compare July 21, 2025 07:57
@ihrasko
Copy link
Collaborator Author

ihrasko commented Jul 21, 2025

Mistake during cherry-pick resolution to use incorrect dependency versions has been fixed.

@ihrasko ihrasko marked this pull request as ready for review July 21, 2025 08:05
@ihrasko ihrasko merged commit ea2786f into PANTHEONtech:21.x Jul 21, 2025
9 of 10 checks passed
@ihrasko ihrasko deleted the 21.x-central-deploy branch July 21, 2025 09:03
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