Migrate from Legacy OSSRH to Central Portal#2256
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 is a significant update to the project's Maven build system, primarily focused on migrating the artifact publishing process from the legacy OSSRH platform to the new Central Portal. Beyond this core migration, it also includes a comprehensive refresh of various Maven plugin versions, updates to OpenDaylight-related dependencies, and a Spring Boot version upgrade, ensuring the project leverages more current and compatible build tools and libraries.
Highlights
- Central Portal Migration: Integrated the
central-publishing-maven-plugin(version 0.7.0) and removed the legacydistributionManagementsections from key parent POMs (lighty-core/dependency-versions/pom.xml,lighty-core/lighty-bom/pom.xml,lighty-core/lighty-minimal-parent/pom.xml,lighty-resources/log4j2-config/pom.xml, and the rootpom.xml) to enable publishing artifacts to the new Central Portal. Thelighty-core/lighty-minimal-parent/pom.xmlalso includes an extensive list of artifacts to exclude from publishing. - Maven Metadata Standardization: Added
<name>and<url>elements to numerous modulepom.xmlfiles acrosslighty-applications,lighty-examples,lighty-models, andlighty-modulesdirectories. The URL is consistently set tohttps://github.com/PANTHEONtech/lighty. - Parent POM Relative Path Updates: Standardized
relativePathelements in child POMs to explicitly point to the parent'spom.xmlfile (e.g.,../lighty-parentchanged to../lighty-parent/pom.xml) for improved clarity and robustness in Maven's reactor build process. This affectslighty-core/lighty-app-parent/pom.xml,lighty-core/lighty-binding-parent/pom.xml,lighty-core/lighty-clustering/pom.xml,lighty-core/lighty-codecs-util/pom.xml,lighty-core/lighty-common/pom.xml,lighty-core/lighty-controller-guice-di/pom.xml,lighty-core/lighty-controller-spring-di/pom.xml,lighty-core/lighty-controller/pom.xml,lighty-core/lighty-parent/pom.xml,lighty-examples/lighty-community-aaa-restconf-app/pom.xml,lighty-examples/lighty-community-restconf-actions-app/pom.xml,lighty-examples/lighty-community-restconf-netconf-app/pom.xml,lighty-models/openconfig-models/pom.xml,lighty-models/test/lighty-example-data-center/pom.xml,lighty-models/test/lighty-test-models/pom.xml,lighty-models/test/lighty-toaster/pom.xml,lighty-modules/integration-tests-aaa/pom.xml,lighty-modules/integration-tests/pom.xml,lighty-modules/lighty-jetty-server/pom.xml,lighty-modules/lighty-netconf-sb/pom.xml,lighty-modules/lighty-openapi/pom.xml,lighty-modules/lighty-restconf-nb-community/pom.xml,lighty-resources/controller-application-assembly/pom.xml,lighty-resources/singlenode-configuration/pom.xml,lighty-resources/start-script/pom.xml, andlighty-tests-report/pom.xml. - Dependency and Plugin Version Upgrades: Updated several core dependencies and Maven plugins to their latest versions. This includes Spring Boot (3.3.13 to 3.5.3), OpenDaylight (ODL) related dependencies (e.g.,
yang-bindingtobinding-spec,mdsal-binding-java-api-generatortobinding-codegen,mdsal-binding-runtime-spitobinding-runtime-spi,mdsal-binding-generatortobinding-generator,mdsal-binding-dom-codectobinding-data-codec-api, andorg.opendaylight.netconf.modeltoorg.opendaylight.mdsal.binding.model.ietffor RFC models), and various Maven build plugins (compiler, clean, install, failsafe, surefire, javadoc, checkstyle, spotbugs) along with their associated checkstyle and spotbugs dependencies. - Build Configuration Refinements: Removed the explicit
maven.compiler.releaseproperty fromlighty-core/lighty-parent/pom.xml, allowing the Maven compiler plugin to infer the Java release version from the project's overall configuration.
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 aims to migrate the project from the legacy OSSRH to the new Sonatype Central Portal for publishing artifacts. It also includes a wide range of dependency and plugin version updates. The changes to support the Central Portal (adding central-publishing-maven-plugin, removing distributionManagement) are correct. However, many of the dependency and plugin version bumps point to versions that do not exist in public Maven repositories. This is a critical issue that will break the build for anyone outside your organization and must be addressed before this can be merged. Additionally, I've noted a potential maintainability issue with the removal of an explicit Java compiler release version. Once the versioning issues are resolved, this PR will be a good step forward for the project's release process.
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)
08702d0 to
57f67ab
Compare
|
Mistake during cherry-pick resolution to use incorrect dependency versions has been fixed. |
Follow: What is different between Central Portal and Legacy OSSRH?.