Skip to content
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

feat: added check for duplicated dependency #4515

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

ashakirin
Copy link
Contributor

@ashakirin ashakirin commented Sep 23, 2024

Comment on lines +198 to +202
<dependency>
<groupId>jakarta.activation</groupId>
<artifactId>jakarta.activation-api</artifactId>
<version>1.2.1</version>
</dependency>
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if in this case we should remove the old one instead. What are your thoughts on that?

Suggested change
<dependency>
<groupId>jakarta.activation</groupId>
<artifactId>jakarta.activation-api</artifactId>
<version>1.2.1</version>
</dependency>

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@timtebeek: in theory - yes, on practice: perhaps user has a good reason to keep old dependency in pom, we do not know that. I do not think that it is responsibility of the CahngeDependencyGroupIdAndArtifact to cleanup old unused dependencies. Perhaps separate recipe would be more clean solution for this case.

Comment on lines +321 to +325
<dependency>
<groupId>javax.activation</groupId>
<artifactId>javax.activation-api</artifactId>
<version>1.2.0</version>
</dependency>
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here; I think ideally we remove the duplicate, since two managed versions of the same dependency don't make much sense (to me).

Suggested change
<dependency>
<groupId>javax.activation</groupId>
<artifactId>javax.activation-api</artifactId>
<version>1.2.0</version>
</dependency>

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do you think it should be responsibility of ChangeDependency recipe? I think it can be a bit confusing for user, if existing dependencies disappearing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

2 participants