Skip to content

HIVE-29001: Remove duplicate mockito dependency in hive-common pom causing maven warnings #5857

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 16, 2025

Conversation

Aggarwal-Raghav
Copy link
Contributor

What changes were proposed in this pull request?

Check HIVE-29001, duplicate dependency of mockito throwing maven warning during build

Why are the changes needed?

To have a clean maven build output :-)

Does this PR introduce any user-facing change?

NO

How was this patch tested?

Will see CI output

@@ -254,12 +254,6 @@
<artifactId>tempus-fugit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The same dependency is present at

<artifactId>mockito-core</artifactId>

@Aggarwal-Raghav
Copy link
Contributor Author

CC @ayushtkn.

@Aggarwal-Raghav
Copy link
Contributor Author

@ayushtkn, quick question unrelated to the PR.
For log4j 2.24.3, the changes to remove packages attribute due to LOG4J2-3644 was done only in data/conf/hive-log4j2.properties.

But in hive tarball which we ship, log4j properties is picked from common/src/main/resources/hive-log4j2.properties which doesn't contain the log4j cleanup changes. Should we address this?

Reason why I am asking is, if i use default log4j properties present in tarball then on starting hive services i get the following warning:

image

CC @InvisibleProgrammer

Copy link

Copy link
Member

@zabetak zabetak left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for the PR @Aggarwal-Raghav. I will merge it if tests come back green!

I've noticed that scope definition for mockito-core is duplicated in almost all places where the dependency is declared but it is redundant since we are doing it in the dependency management section. I guess we could do some additional cleanup around this in a follow-up ticket. Moreover, it would be interesting to see if the dependency can be dropped from some of modules; not sure it is used everywhere where it is declared.

Regarding the comments around the LOG4J cleanup it would be more appropriate to discuss it under the respective JIRA ticket. If you believe there is an issue then it would be even better to log directly a new JIRA ticket and cc the appropriate people.

@zabetak zabetak merged commit 98c0a1a into apache:master Jun 16, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants