-
Notifications
You must be signed in to change notification settings - Fork 267
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
use-latest-releases
checks transitive dependencies instead of direct dependencies
#743
Comments
use-latest-releases
checks transitive dependencies instead of direct dependencies
Are you sure it's because of transitive dependencies rather than because of maven unwrapping the parent POM? I've tested your test case without the parent and noticed no extra dependency retrieval. |
I think you're right. But why is it doing so ? I want to upgrade the versions of my project, I cannot upgrade Spring Boot internal's versions. The dependencies of my parent are still transitive dependencies. |
The issue is caused by Maven using the dependencyManagement section from parent. This will get resolved when #814 is merged. Still thinking when/if this issue might be triggered for dependencies. If that would be the case, dependencies would also need to be processed from raw model. |
Given the following
pom.xml
file :I expected the command :
to give the following input :
But instead it checks all the following dependencies :
I believe it's because it checks all the transitive dependencies rather than only the direct dependencies. It's troublesome because on big projects, it's very long. I tried running it the other day, and I gave up after 9 hours of runtime. The next day, I made it run from a server which has a very high bandwidth to our Nexus, and it took 7h30.
I checked the code of UseLatestReleaseMojo.java, and I saw it's calling the method getDependencies. This method returns transitive dependencies. And I don't see any filtering before the call to getNewerVersions, which I guess is doing the slow HTTP queries. I think the code should only fetch the direct dependencies. I can write the PR if I get any feedback.
The text was updated successfully, but these errors were encountered: