Migrate from Legacy OSSRH to Central Portal#2255
Conversation
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)
There was a problem hiding this comment.
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
distributionManagementsetup with thecentral-publishing-maven-pluginin thereleaseprofiles of key parent POMs. - POM Metadata Enrichment: Numerous
pom.xmlfiles 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.xmlfiles have had their<relativePath>for parent POMs updated to explicitly includepom.xml(e.g.,../lighty-parentchanged to../lighty-parent/pom.xml). This ensures more robust and explicit parent POM resolution within the multi-module build. - Dependency Upgrade: The
spring-boot-dependenciesversion inlighty-core/lighty-controller-spring-di/pom.xmlhas been upgraded from3.3.13to3.5.3, bringing in newer Spring Boot features and fixes. - Artifact Exclusion Configuration: The
central-publishing-maven-plugininlighty-core/lighty-minimal-parent/pom.xmlhas been configured with an extensiveexcludeArtifactslist. 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
-
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. ↩
There was a problem hiding this comment.
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.
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)
512cd1d to
dfba5dc
Compare
|
Mistake during cherry-pick resolution to use incorrect dependency versions has been fixed. |
Follow: What is different between Central Portal and Legacy OSSRH?.