Skip to content

Eliminate odlparent managed versions#2612

Draft
ihrasko wants to merge 1 commit intoPANTHEONtech:mainfrom
ihrasko:odlparent-managed
Draft

Eliminate odlparent managed versions#2612
ihrasko wants to merge 1 commit intoPANTHEONtech:mainfrom
ihrasko:odlparent-managed

Conversation

@ihrasko
Copy link
Copy Markdown
Collaborator

@ihrasko ihrasko commented Mar 31, 2026

// TODO: complete

JIRA: LIGHTY-427

// TODO: complete

JIRA: LIGHTY-427
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
@ihrasko ihrasko marked this pull request as draft March 31, 2026 06:56
Copy link
Copy Markdown

@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 removes explicit version declarations for several dependencies and plugins across multiple POM files to rely on centralized management. Feedback highlights that removing plugin versions in "lighty-parent" may result in unmanaged versions since the project imports rather than inherits from "odlparent". Furthermore, a potential version mismatch was identified for SLF4J and Log4j, as their version properties remain in use within the SpotBugs plugin configuration despite being removed from the primary dependency definitions.

Comment on lines 74 to 81
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.15.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>3.5.0</version>
</plugin>
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

Removing the versions for maven-compiler-plugin and maven-clean-plugin from pluginManagement requires that these versions are managed by a parent POM. However, lighty-parent inherits from lighty-minimal-parent, which does not inherit from odlparent (it only imports it for dependency management). Since pluginManagement is not inherited via BOM imports (scope=import), these plugins will now have unmanaged versions.

Additionally, this change is inconsistent with other plugins in the same section (e.g., maven-resources-plugin at line 84 and maven-jar-plugin at line 89) which still have explicit versions despite also being managed by odlparent.

If the goal is to use odlparent's plugin versions, lighty-minimal-parent should be updated to inherit from it; otherwise, these explicit versions should be retained to ensure build stability.

References
  1. Plugin versions should be managed either explicitly or via inheritance from a parent POM to ensure build reproducibility and avoid reliance on Maven defaults.

Comment on lines 43 to 58
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j2-impl</artifactId>
<version>${log4j2.version}</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>${log4j2.version}</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>${log4j2.version}</version>
</dependency>
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The versions for SLF4J and Log4j dependencies have been removed to rely on odlparent management. However, the properties slf4j.version and log4j2.version (defined at lines 32-33) are still present and used in the spotbugs-maven-plugin configuration (lines 222, 227). This creates a risk of version mismatch between the main project dependencies and the plugin's dependencies.

To ensure consistency, consider removing the explicit versions from the SpotBugs plugin dependencies as well (allowing them to be managed by the same BOM) and then removing these properties if they are no longer needed elsewhere.

References
  1. Dependency versions should be managed consistently across the project to avoid classpath conflicts and version drift between main code and build tools.

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.

1 participant