-
Notifications
You must be signed in to change notification settings - Fork 363
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
A way to get all dependency instead ResolvedDependency only #4212
Comments
Thanks for the suggestion @abccbaandy ! I think this could be a separate recipe that folks can run to remove direct dependencies that are also available transitively. We already have that dependency insight readily available. A recipe would then have to use that information to strip out any dependencies. Some care should be taken of course with scopes and optional dependencies, and you could end up with a pom.xml that's more sensitive to changes in transitive dependencies when updating dependency versions. But folks running this recipe likely would know those limitations, and still prefer a minimal pom.xml. Thanks for the offer to help implement such a recipe! Would you be looking to add this first and only for Maven? |
Yes, I already did it, you can see openrewrite/rewrite-migrate-java#481 (comment)
|
Ah so you're saying that our model currently only gives you the resolved dependency, but you're losing out on querying if that dependency is also available transitively? I could see how that would complicate this recipe if that's the case. |
What problem are you trying to solve?
I want to remove all dependency which already contain in others, especially for spring manage dependency.
Have you considered any alternatives or workarounds?
I just check the spring exist, but I don't think it's long-term solution.
Additional context
openrewrite/rewrite-migrate-java#481
Are you interested in contributing this feature to OpenRewrite?
Yes, I already start to study the source of DependencyInsight.
openrewrite/rewrite-migrate-java#481 (comment)
The text was updated successfully, but these errors were encountered: